Skip to content

Commit

Permalink
Merge pull request #35 from primait/update-opentelemetry
Browse files Browse the repository at this point in the history
Update opentelemetry to 1.0
  • Loading branch information
mbusi authored Jan 31, 2022
2 parents 2d551f5 + 3dda8a7 commit bbc4a36
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM public.ecr.aws/prima/elixir:1.10.2-1
FROM public.ecr.aws/prima/elixir:1.11.2-2

# Serve per avere l'owner dei file scritti dal container uguale all'utente Linux sull'host
USER app
Expand Down
4 changes: 2 additions & 2 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use Mix.Config
import Config

try do
import_config "#{Mix.env()}.exs"
import_config "#{config_env()}.exs"
rescue
_ -> :ok
end
10 changes: 5 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ defmodule OpentelemetryAbsinthe.MixProject do
def project do
[
app: :opentelemetry_absinthe,
version: "1.0.0-rc.7",
elixir: "~> 1.10",
version: "1.0.0",
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps(),
package: package(),
Expand All @@ -24,16 +24,16 @@ defmodule OpentelemetryAbsinthe.MixProject do
[
{:absinthe, ">= 1.5.0", optional: true},
{:jason, "~> 1.2"},
{:opentelemetry_api, "~> 1.0.0-rc.3"},
{:opentelemetry_api, "~> 1.0"},
{:telemetry, "~> 0.4 or ~> 1.0.0"}
] ++ dev_deps()
end

defp dev_deps do
[
{:absinthe_plug, "~> 1.5", only: :test},
{:opentelemetry, "~> 1.0.0-rc.3", only: :test},
{:opentelemetry_exporter, "~> 1.0.0-rc.3", only: :test},
{:opentelemetry, "~> 1.0", only: :test},
{:opentelemetry_exporter, "~> 1.0", only: :test},
{:plug_cowboy, "~> 2.2", only: :test},
{:credo, "~> 1.4", only: [:dev, :test]},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
Expand Down
8 changes: 5 additions & 3 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
"makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"},
"mime": {:hex, :mime, "2.0.2", "0b9e1a4c840eafb68d820b0e2158ef5c49385d17fb36855ac6e7e087d4b1dcc5", [:mix], [], "hexpm", "e6a3f76b4c277739e36c2e21a2c640778ba4c3846189d5ab19f97f126df5f9b7"},
"nimble_parsec": {:hex, :nimble_parsec, "0.6.0", "32111b3bf39137144abd7ba1cce0914533b2d16ef35e8abc5ec8be6122944263", [:mix], [], "hexpm", "27eac315a94909d4dc68bc07a4a83e06c8379237c5ea528a9acff4ca1c873c52"},
"opentelemetry": {:hex, :opentelemetry, "1.0.0-rc.3", "d2698bee882c354274563ee85d097bb736a9adb8d8ed376a4deea0cd3a14bb31", [:rebar3], [{:opentelemetry_api, "~> 1.0.0-rc.3", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "c9105933df0d783d94cf08d79206eb8d6578abc0bcbd498d0b497ec62a4e30a8"},
"opentelemetry_api": {:hex, :opentelemetry_api, "1.0.0-rc.3.2", "588ebf85fa7d18eba8db297b7d0a2a654f680f35c4466cd0045cd12a6fda27d7", [:mix, :rebar3], [], "hexpm", "1e0ba55db6718d5797e72c00e3821e60e02f7829e3fb64dc1a7c96f7c2776a58"},
"opentelemetry_exporter": {:hex, :opentelemetry_exporter, "1.0.0-rc.3", "76f5657d4c94a12003d9ed2c8da1023c815e98f5553184dbb0cdaeec76db676d", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.0.0-rc.3", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.0.0-rc.3", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "267f0e4c3f1f5557cc7ad6ac71d66b8eaf7b3b56fde942c21f8a0bc96174fe1e"},
"opentelemetry": {:hex, :opentelemetry, "1.0.0", "6e98f4a9230681b2e4c88d45783ce1c02d671ffc0b5ac0cba69a34a3f5ada8d8", [:rebar3], [{:opentelemetry_api, "~> 1.0.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "08d8697740f70594d05067cb62a0a8845ff568b2d47e1f8c78c46708ab58a74f"},
"opentelemetry_api": {:hex, :opentelemetry_api, "1.0.0", "6e501f750ead189f35aed07eb8023fa6655fca12f913a196102f67db4ed5172c", [:mix, :rebar3], [], "hexpm", "ac51520bde21fdea7f82cea9236ce4e88a21281c22bc23b0f1fa3b28b4352fcf"},
"opentelemetry_exporter": {:hex, :opentelemetry_exporter, "1.0.0", "12fd928e72dec8108d40214a667e7a90026827d6268db678617c9e40ec3dc931", [:rebar3], [{:grpcbox, ">= 0.0.0", [hex: :grpcbox, repo: "hexpm", optional: false]}, {:opentelemetry, "~> 1.0", [hex: :opentelemetry, repo: "hexpm", optional: false]}, {:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:tls_certificate_check, "~> 1.11", [hex: :tls_certificate_check, repo: "hexpm", optional: false]}], "hexpm", "e2d2377abfb823cc99c1b68b4ce31df1ff1ce63e0c7bdbee7a7527e2d825168d"},
"plug": {:hex, :plug, "1.12.1", "645678c800601d8d9f27ad1aebba1fdb9ce5b2623ddb961a074da0b96c35187d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d57e799a777bc20494b784966dc5fbda91eb4a09f571f76545b72a634ce0d30b"},
"plug_cowboy": {:hex, :plug_cowboy, "2.5.2", "62894ccd601cf9597e2c23911ff12798a8a18d237e9739f58a6b04e4988899fe", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "ea6e87f774c8608d60c8d34022a7d073bd7680a0a013f049fc62bf35efea1044"},
"plug_crypto": {:hex, :plug_crypto, "1.2.2", "05654514ac717ff3a1843204b424477d9e60c143406aa94daf2274fdd280794d", [:mix], [], "hexpm", "87631c7ad914a5a445f0a3809f99b079113ae4ed4b867348dd9eec288cecb6db"},
"ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
"telemetry": {:hex, :telemetry, "0.4.3", "a06428a514bdbc63293cd9a6263aad00ddeb66f608163bdec7c8995784080818", [:rebar3], [], "hexpm", "eb72b8365ffda5bed68a620d1da88525e326cb82a75ee61354fc24b844768041"},
"tls_certificate_check": {:hex, :tls_certificate_check, "1.11.0", "609dcd503f31170f0799dac380eb0e086388cf918fc769aaa60ddd6bbf575218", [:rebar3], [{:ssl_verify_fun, "1.1.6", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "4ab962212ef7c87482619cb298e1fe06e047b57f0bd58cc417b3b299eb8d036e"},
}
8 changes: 5 additions & 3 deletions test/instrumentation_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ defmodule OpentelemetryAbsintheTest.Instrumentation do
"graphql.request.variables",
"graphql.response.errors",
"graphql.response.result"
] = attributes |> Enum.map(&elem(&1, 0)) |> Enum.sort()
] = attributes |> keys() |> Enum.sort()
end

test "options provided via application env have precedence over defaults" do
Expand All @@ -54,7 +54,7 @@ defmodule OpentelemetryAbsintheTest.Instrumentation do
assert [
"graphql.request.variables",
"graphql.response.errors"
] = attributes |> Enum.map(&elem(&1, 0)) |> Enum.sort()
] = attributes |> keys() |> Enum.sort()
end

test "options provided to setup() have precedence over defaults and application env" do
Expand All @@ -71,7 +71,9 @@ defmodule OpentelemetryAbsintheTest.Instrumentation do
"graphql.request.query",
"graphql.request.variables",
"graphql.response.errors"
] = attributes |> Enum.map(&elem(&1, 0)) |> Enum.sort()
] = attributes |> keys() |> Enum.sort()
end
end

defp keys(attributes_record), do: attributes_record |> elem(4) |> Map.keys()
end

0 comments on commit bbc4a36

Please sign in to comment.