Skip to content

feat!: remove deprecated otel span processor#1307

Open
giortzisg wants to merge 2 commits into
masterfrom
otel/remove-span-processor
Open

feat!: remove deprecated otel span processor#1307
giortzisg wants to merge 2 commits into
masterfrom
otel/remove-span-processor

Conversation

@giortzisg
Copy link
Copy Markdown
Contributor

Description

This removes the deprecated span processor.

Issues

Changelog Entry Instructions

To add a custom changelog entry, uncomment the section above. Supports:

  • Single entry: just write text
  • Multiple entries: use bullet points
  • Nested bullets: indent 4+ spaces

For more details: custom changelog entries

Reminders

Changelog Entry

  • remove deprecatedotel.NewSentrySpanProcessor. Users should now use the sentryotlp.NewTraceExporter instead:
// Before
sentry.Init(sentry.ClientOptions{Dsn: dsn, EnableTracing: true, TracesSampleRate: 1.0})

tp := sdktrace.NewTracerProvider(
	sdktrace.WithSpanProcessor(sentryotel.NewSentrySpanProcessor()),
)
otel.SetTextMapPropagator(sentryotel.NewSentryPropagator())
otel.SetTracerProvider(tp)

// After:
sentry.Init(sentry.ClientOptions{
	Dsn: dsn, EnableTracing: true, TracesSampleRate: 1.0,
	Integrations: func(i []sentry.Integration) []sentry.Integration {
		return append(i, sentryotel.NewOtelIntegration())
	},
})

exporter, _ := sentryotlp.NewTraceExporter(ctx, dsn)
tp := sdktrace.NewTracerProvider(sdktrace.WithBatcher(exporter))
otel.SetTracerProvider(tp)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

Semver Impact of This PR

🔴 Major (breaking changes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Breaking Changes 🛠

  • remove deprecatedotel.NewSentrySpanProcessor. Users should now use the sentryotlp.NewTraceExporter instead: by giortzisg in #1307
    // Before
    sentry.Init(sentry.ClientOptions{Dsn: dsn, EnableTracing: true, TracesSampleRate: 1.0})
    
    tp := sdktrace.NewTracerProvider(
    	sdktrace.WithSpanProcessor(sentryotel.NewSentrySpanProcessor()),
    )
    otel.SetTextMapPropagator(sentryotel.NewSentryPropagator())
    otel.SetTracerProvider(tp)
    
    // After:
    sentry.Init(sentry.ClientOptions{
    	Dsn: dsn, EnableTracing: true, TracesSampleRate: 1.0,
    	Integrations: func(i []sentry.Integration) []sentry.Integration {
    		return append(i, sentryotel.NewOtelIntegration())
    	},
    })
    
    exporter, _ := sentryotlp.NewTraceExporter(ctx, dsn)
    tp := sdktrace.NewTracerProvider(sdktrace.WithBatcher(exporter))
    otel.SetTracerProvider(tp)
  • Remove the ContextifyFrames integration. The recommended way to add source context is SCM by giortzisg in #1302

Internal Changes 🔧

Deps

  • Bump github.com/gofiber/fiber/v2 from 2.52.12 to 2.52.13 in /fiber by dependabot in #1300
  • Bump github.com/gofiber/fiber/v2 from 2.52.12 to 2.52.13 in /crosstest by dependabot in #1301
  • Bump getsentry/craft from 2.25.2 to 2.26.2 by dependabot in #1293
  • Bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.25.2 to 2.26.2 by dependabot in #1294

🤖 This preview updates automatically when you update the PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants