Skip to content

Commit

Permalink
Register tracer (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbusi authored Oct 13, 2021
1 parent d4be790 commit c952543
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/teleplug/instrumentation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ defmodule Teleplug.Instrumentation do
]

def setup do
OpenTelemetry.register_application_tracer(:teleplug)

# attach to plug and phoenix route dispatch events so it works when using one or the other
Enum.each(@start_events, fn event -> attach_to_event(event, &__MODULE__.register_route/4) end)
Enum.each(@end_events, fn event -> attach_to_event(event, &__MODULE__.unregister_route/4) end)
Expand Down

0 comments on commit c952543

Please sign in to comment.