Skip to content

Commit

Permalink
Update opentelemetry deps (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbusi authored Sep 21, 2021
1 parent 0b2d333 commit 9b8d93d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion config/#con#

This file was deleted.

4 changes: 4 additions & 0 deletions lib/teleplug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
8 changes: 3 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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},
Expand Down

0 comments on commit 9b8d93d

Please sign in to comment.