We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A new transaction is created if its parent span is already finished with OpenTelemetry integration.
func TestOtelTrace(t *testing.T) { if err := sentry.Init(sentry.ClientOptions{ Dsn: "https://[email protected]/0", EnableTracing: true, TracesSampleRate: 1.0, Environment: "test", Debug: true, }); err != nil { panic("Sentry initialization failed: " + err.Error()) } defer sentry.Flush(2 * time.Second) tp := sdktrace.NewTracerProvider( sdktrace.WithSpanProcessor(sentryotel.NewSentrySpanProcessor()), ) tracer := tp.Tracer("test_tracer") ctx, span := tracer.Start(context.Background(), "test_transaction") defer span.End() ctx, span2 := tracer.Start(ctx, "test_span_1") time.Sleep(time.Second) span2.End() ctx, span3 := tracer.Start(ctx, "test_span_2") time.Sleep(time.Second) span3.End() }
Run the test then test_span_2 became a transaction.
test_span_2
I would like test_span_2 to be a span. Using sentry-go directly works as expected.
func TestSentryTrace(t *testing.T) { if err := sentry.Init(sentry.ClientOptions{ Dsn: "https://[email protected]/0", EnableTracing: true, TracesSampleRate: 1.0, Environment: "test", Debug: true, }); err != nil { panic("Sentry initialization failed: " + err.Error()) } defer sentry.Flush(2 * time.Second) ctx := context.Background() span := sentry.StartTransaction(ctx, "test_transaction") defer span.Finish() span2 := sentry.StartSpan(span.Context(), "test_span_1") time.Sleep(time.Second) span2.Finish() span3 := sentry.StartSpan(span2.Context(), "test_span_2") time.Sleep(time.Second) span3.Finish() }
sentry-go
The text was updated successfully, but these errors were encountered:
cleptric
No branches or pull requests
Summary
A new transaction is created if its parent span is already finished with OpenTelemetry integration.
Steps To Reproduce
Run the test then
test_span_2
became a transaction.Expected Behavior
I would like
test_span_2
to be a span.Using sentry-go directly works as expected.
SDK
sentry-go
version: v0.22.0Sentry
Additional context
The text was updated successfully, but these errors were encountered: