Skip to content

docs(go): Update OpenTelemetry docs for OTLP migration#17039

Open
giortzisg wants to merge 3 commits intomasterfrom
go/otlp
Open

docs(go): Update OpenTelemetry docs for OTLP migration#17039
giortzisg wants to merge 3 commits intomasterfrom
go/otlp

Conversation

@giortzisg
Copy link
Copy Markdown
Collaborator

DESCRIBE YOUR PR

Update the Go OpenTelemetry docs to reflect the migration away from the deprecated span processor setup and toward OTLP.

This updates the landing page and shared Go snippets to:

  • recommend sentryotlp.NewTraceExporter() for direct-to-Sentry tracing
  • document sentryotel.NewErrorLinkingIntegration() for linking Sentry errors to OTel traces
  • call out the collector-based path and link to the OTLP collector setup docs

IS YOUR CHANGE URGENT?

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Added reviewer

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Update the Go OpenTelemetry landing page and shared setup snippets to
prefer OTLP export over the deprecated span processor integration.
Document the direct-to-Sentry exporter path and the collector-based
path so Go users have a clear migration target.

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Apr 9, 2026 3:33pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Apr 9, 2026 3:33pm

Request Review

Replace non-existent NewErrorLinkingIntegration() with the actual
exported function sentryotel.NewOtelIntegration() throughout the
OTLP migration docs.

Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
@giortzisg giortzisg marked this pull request as ready for review April 9, 2026 15:20
TracesSampleRate: 1.0,
Debug: true,
Integrations: func(integrations []sentry.Integration) []sentry.Integration {
return append(integrations, sentryotel.NewOtelIntegration())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The Go OTLP setup documentation omits instructions for configuring a standard OpenTelemetry propagator, which will break distributed tracing for users following the guide.
Severity: HIGH

Suggested Fix

Update the Go OTLP setup documentation to include an example of how to configure a standard OpenTelemetry propagator, such as otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{})). Explain that this is required for distributed tracing to work with OTLP.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: platform-includes/performance/opentelemetry-setup/go.mdx#L22

Potential issue: The updated Go documentation for OpenTelemetry setup removes the
previous Sentry-specific propagator configuration but does not replace it with
instructions for setting up a standard OpenTelemetry propagator, such as
`propagation.TraceContext{}`. Users following this guide will have an incomplete setup,
causing distributed tracing across services to fail because trace context will not be
propagated. The OTLP integration specification explicitly delegates propagator setup to
documentation, a responsibility this update fails to meet.

Did we get this right? 👍 / 👎 to inform future reviews.

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.

1 participant