Skip to content
New issue

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

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

Already on GitHub? # to your account

Configuring span factory for OpenTelemetry too late causes issues #4005

Open
adinauer opened this issue Dec 20, 2024 · 0 comments
Open

Configuring span factory for OpenTelemetry too late causes issues #4005

adinauer opened this issue Dec 20, 2024 · 0 comments

Comments

@adinauer
Copy link
Member

Description

When moving options.setSpanFactory(SpanFactoryFactory.create(new LoadClass(), NoOpLogger.getInstance())); from the SentryOptions ctor to Sentry.init OpenTelemetry ends some spans early.

We don't know why that happens yet.

The agentless sample does not have the "spanCreatedThroughSentryApi" span due to e.g. "spanCreatedThroughOtelApi" being ended early and the startChild call thus NoOping. Setting an earlier breakpoint causes the behaviour to change and leads to "personSpanThroughOtelAnnotation" being ended prematurely. When removing the @WithSpan annotation, it's the root span that's ended too early.

Also see #3995 (comment)

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Status: Needs Discussion
Development

No branches or pull requests

1 participant