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

OpenTelemetry Support Follow-Ups after Basic Support #2419

Closed
1 of 7 tasks
adinauer opened this issue Dec 6, 2022 · 5 comments
Closed
1 of 7 tasks

OpenTelemetry Support Follow-Ups after Basic Support #2419

adinauer opened this issue Dec 6, 2022 · 5 comments

Comments

@adinauer
Copy link
Member

adinauer commented Dec 6, 2022

Description

Basic support for OpenTelemetry has been added in #2327

Here are some more TODOs:

  • Set instrumenter (e.g. using an Aspect) to OTEL from the Java Agent so users don't have to manually do it
  • Detect sentry-opentelemetry-agent and set instrumenter automatically even when not using auto config (very similar to above)
  • End to end tests for OTEL on a running application
  • [Increase timestamp precision for start/end of spans from ms to ns 10μs (which will probably be changed to μs by relay)] (Higher precision start timestamp for Spans #2394)
  • Add a more complex service using Spring Boot to https://github.com/getsentry/opentelemetry-demo and showcase errors and other features Sentry has to offer
  • Once the more complex demo has been merged, revert the adservice close to original state and showcase how easy it is to use Sentry for OTEL even without changing the target application
  • Add a provider for SentryPropagator, see SDK for Quarkus #2254 (comment)
@smeubank
Copy link
Member

getsentry/opentelemetry-demo#12

related to this as well 👍

@adinauer adinauer removed their assignment Feb 7, 2023
@devurandom
Copy link

Will this allow me to annotate my source code with OpenTelemetry spans, and Sentry picks up attributes from the OpenTelemetry Context / Span and automatically adds them to events? I.e. achieve what is done with withScope and setTag in these examples https://docs.sentry.io/platforms/java/enriching-events/scopes/#local-scopes, but using the OpenTelemetry Java API instead of the Sentry Java API?

How is #3436 related to this?

@lbloder
Copy link
Collaborator

lbloder commented Jul 19, 2024

Hi @devurandom,
Actually we are focussing on the other way around. I.e. using the Sentry API to create OpenTelemetry spans under the hood. And then export these to Sentry. We are currently also exporting the spans created by OpenTelemetry Instrumentation to Sentry, so in theory, your use case should work as well. I will dig into this and let you know.

#3436 is basically replacing this issue. We did a lot of rework with Hubs/Scopes and also how we interface with OpenTelemetry. These changes will be part of our next Major Version (v 8). There are currently alpha versions available to test if you're interested. As of now we have released alpha 4 (https://github.com/getsentry/sentry-java/releases/tag/8.0.0-alpha.4).

I will update the newer issue with the open tasks from this one and then close it. You can track our progress in #3436 from now on.

@lbloder
Copy link
Collaborator

lbloder commented Jul 19, 2024

Closed in favor of #3436

@lbloder lbloder closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2024
@adinauer
Copy link
Member Author

@devurandom

Will this allow me to annotate my source code with OpenTelemetry spans, and Sentry picks up attributes from the OpenTelemetry Context / Span and automatically adds them to events?

This should also work but depends on which attributes you'd like to set. Some of them would work if you use the correct name for the attribute. Some of those are listed in dev docs. The Sentry SDK should pick up attributes on he OTel span and send it to Sentry automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants