Go to file
Andrew Rosa 56c6503a93
Fix two use cases of Ecto span propagation (#82)
First one is related to `OpenTelemetry.Ctx` API. I've noticed in a few
scenarios the current span of a trace may get lost after Ecto calls.

Looking at the The `attach/1` typespec, it's a Ctx -> Token, while
`dettach/1` as Token -> Ctx function. That made me assume the expected
input of dettach is the return type of attach. Indeed, after this change
we got the behavior of Ecto calls preserve the parent span untouched.

That leads to a second bug found. When ecto does simple calls within a
Task, due the special propagation code for preloads that means it will
skip the current span, if any.  The solution here is to first check the
current process.

One test was added to reproduce this bug.
2022-11-15 17:55:32 -07:00
.github Fix CI errors, update GHA deps, update versions (#125) 2022-11-15 16:22:28 -07:00
examples chore: ran formatter (#123) 2022-11-15 16:25:04 -07:00
instrumentation Fix two use cases of Ecto span propagation (#82) 2022-11-15 17:55:32 -07:00
propagators/opentelemetry_process_propagator update elixir package deps (#126) 2022-11-15 17:48:50 -07:00
utilities update elixir package deps (#126) 2022-11-15 17:48:50 -07:00
.gitignore Update .gitignore 2021-11-22 12:18:02 -07:00
CODEOWNERS Add otel tesla library (#90) 2022-08-25 12:47:59 -06:00
CONTRIBUTING.md Add info about conventions to guides (#33) 2021-11-12 10:52:29 -07:00
LICENSE Initial commit 2021-04-19 10:19:28 -07:00
README.md Update README.md (#71) 2022-03-20 16:44:31 -06:00
mix.exs Otel phoenix migration (#4) 2021-09-12 13:49:24 -06:00
rebar.lock Implemented AWS X-Ray TraceId Generator (#95) 2022-07-21 11:40:47 -06:00

README.md

<p align="center"> <strong> <a href="https://opentelemetry.io/docs/instrumentation/erlang/getting-started/">Getting Started<a/>   •   <a href="https://hexdocs.pm/opentelemetry_api/1.0.0-rc.2/OpenTelemetry.html">API Documentation<a/> </strong> </p> <p align="center"> <strong> <a href="CONTRIBUTING.md">Contributing<a/>   •   <a href="instrumentation/">Instrumentation<a/>   •   <a href="propagators/">Propagators<a/>   •   <a href="examples/">Examples<a/> </strong> </p>

Getting Started   •   API Documentation

Contributing   •   Instrumentation   •   Propagators   •   Examples

EEF Observability WG project Elixir

About this project

This is a repository for OpenTelemetry Erlang & Elixir contributions that are not part of the core repository and core distribution of the API and SDK.

Instrumentations

OpenTelemetry can collect tracing data using instrumentation. Vendors/Users can also create and use their own. Currently, OpenTelemetry supports automatic tracing for:

Supported Runtimes

OpenTelemetry requires OTP v21.3 and above.

See Elixir OTP Compatibility for supported OTP/Elixir combinations.

Contributing

We'd love your help!. Use tags [up-for-grabs][up-for-grabs-issues] and good first issue to get started with the project. Follow CONTRIBUTING guide to report issues or submit a proposal.

License

Apache 2.0 - See LICENSE for more information.