Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for OpenTelemetry tracing #1612

Merged
merged 16 commits into from
Nov 18, 2024
Merged

Add support for OpenTelemetry tracing #1612

merged 16 commits into from
Nov 18, 2024

Conversation

joshk
Copy link
Collaborator

@joshk joshk commented Oct 25, 2024

Adds support for:

  • phoenix routes
  • liveview
  • oban
  • and ecto

Further work will need to be done for DeviceChannel bits

The default behavior is to trace everything, but I have added support for a percentage based sampler.

To use this with honeycomb you would configure it with:

OTLP_ENDPOINT=https://api.honeycomb.io
OTLP_AUTH_HEADER=x-honeycomb-team
OTLP_AUTH_HEADER_VALUE=your-team-id

It also interesting to note that Sentry is coming out with Elixir tracing support soon

I'd like to merge this in while I work more on the Oban OpenTelemetry PR: open-telemetry/opentelemetry-erlang-contrib#400

@joshk
Copy link
Collaborator Author

joshk commented Oct 26, 2024

Screenshot 2024-10-26 at 1 35 17 PM

Copy link
Contributor

@lawik lawik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It all made rough sense to me. I haven't done OTel specifically but looks reasonable.

Recommend others weighing in as well :)

lib/nerves_hub/telemetry/filtered_sampler.ex Outdated Show resolved Hide resolved
@@ -48,6 +49,7 @@ defmodule NervesHub.Deployments.Orchestrator do
As devices update and reconnect, the new orchestrator is told that the update
was successful, and the process is repeated.
"""
@decorate with_span("Deployments.Orchestrator.trigger_update")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen this before, very cool 🤤

@joshk joshk merged commit 6b47159 into main Nov 18, 2024
2 checks passed
@joshk joshk deleted the open-telemetry-tracing branch November 18, 2024 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants