diff --git a/config/#con# b/config/#con# deleted file mode 100644 index 297d411..0000000 --- a/config/#con# +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/lib/teleplug.ex b/lib/teleplug.ex index 71dbb42..379386d 100644 --- a/lib/teleplug.ex +++ b/lib/teleplug.ex @@ -34,6 +34,8 @@ defmodule Teleplug do http_server_attributes(conn) ++ network_attributes(conn) + parent_ctx = Tracer.current_span_ctx() + new_ctx = Tracer.start_span( conn.request_path, @@ -53,6 +55,8 @@ defmodule Teleplug do Conn.register_before_send(conn, fn conn -> Tracer.set_attribute("http.status_code", conn.status) Tracer.end_span() + + Tracer.set_current_span(parent_ctx) conn end) end diff --git a/mix.exs b/mix.exs index 512a6f8..621ed41 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Teleplug.MixProject do def project do [ app: :teleplug, - version: "0.1.0", + version: "1.0.0-rc.1", elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps(), @@ -22,10 +22,8 @@ defmodule Teleplug.MixProject do # Run "mix help deps" to learn about dependencies. defp deps do [ - # {:dep_from_hexpm, "~> 0.3.0"}, - # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"} - {:opentelemetry_api, "~> 0.6.0"}, - {:opentelemetry, "~> 0.6.0", only: :test}, + {:opentelemetry_api, "~> 1.0.0-rc.2"}, + {:opentelemetry, "~> 1.0.0-rc.2", only: :test}, {:plug, "~> 1.11"}, {:credo, "~> 1.5", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},