opentelemetry-erlang-contrib/instrumentation/opentelemetry_tesla
Bryan Naegele 0e6a776ffb
Fix CI errors, update GHA deps, update versions (#125)
* Fix CI errors, update GHA deps, update versions

* output syntax

* remove OTP 22 tests

* set concurrency to cancel in progress

* whitespace

* incompatible vsns and failed test

* Try pulling excludes out

* Escaping

* Just drop < 1.13 until this can move to workflows

* quote
2022-11-15 16:22:28 -07:00
..
lib/middleware [opentelemetry-tesla] add custom span name override as middleware opt (#105) 2022-10-04 16:32:36 -06:00
test Fix CI errors, update GHA deps, update versions (#125) 2022-11-15 16:22:28 -07:00
.formatter.exs Fix CI errors, update GHA deps, update versions (#125) 2022-11-15 16:22:28 -07:00
LICENSE Add otel tesla library (#90) 2022-08-25 12:47:59 -06:00
README.md Bump opentelemetry_tesla version (#112) 2022-10-12 15:25:08 -06:00
mix.exs Bump opentelemetry_tesla version (#112) 2022-10-12 15:25:08 -06:00
mix.lock Add otel tesla library (#90) 2022-08-25 12:47:59 -06:00

README.md

OpenTelemetryTesla

Tesla middleware that creates OpenTelemetry spans and injects tracing headers into HTTP requests for Tesla clients.

Installation

If available in Hex, the package can be installed by adding opentelemetry_tesla to your list of dependencies in mix.exs:

def deps do
  [
    {:opentelemetry_tesla, "~> 2.1.0"}
  ]
end

Setup

Whilst using this middleware is as simple as adding it to your Tesla middlewares configuration, It's very important to set the correct order of the middlewares

The is crucial to correctly get the parameterized version of the URL, something like /api/users/:id instead of /api/users/3.

OpenTelemetry comes first, PathParams (if you're using it) comes after.

Tesla.Middleware.OpenTelemetry
Tesla.Middleware.PathParams