Skip to content

docs(go): Update Echo guide for v5 and TracesSampler SamplingContext#17377

Open
giortzisg wants to merge 2 commits intomasterfrom
giortzisg/docs/go-echo-v5-and-traces-sampler-updates
Open

docs(go): Update Echo guide for v5 and TracesSampler SamplingContext#17377
giortzisg wants to merge 2 commits intomasterfrom
giortzisg/docs/go-echo-v5-and-traces-sampler-updates

Conversation

@giortzisg
Copy link
Copy Markdown
Collaborator

DESCRIBE YOUR PR

Updates Go SDK docs to reflect two changes from recent sentry-go releases:

Echo v5 (getsentry/sentry-go#1183)

  • Echo v5 changed handler signatures from echo.Context (interface) to *echo.Context (pointer)
  • Updated all code examples in the Echo guide to use *echo.Context
  • Updated description to mention Echo v5 requirement

TracesSampler SamplingContext fields (getsentry/sentry-go#1259)

  • SamplingContext gained two new fields: ParentSampled and ParentSampleRate
  • ParentSampled works for both local and remote parent spans, replacing the old ctx.Parent != nil pattern
  • ParentSampleRate exposes the sample rate from the parent's Dynamic Sampling Context
  • Updated default-sampling-context-platform/go.mdx with the new struct definition
  • Updated always-inherit-sampling-decision/go.mdx to use ctx.ParentSampled instead of ctx.Parent.Sampled

IS YOUR CHANGE URGENT?

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

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

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

Echo v5 changed handler signatures from echo.Context to *echo.Context
(pointer). Update all code examples in the Echo guide accordingly.

TracesSampler gained two new SamplingContext fields:
- ParentSampled: covers both local and remote parent sampling decisions,
  replacing the previous pattern of checking ctx.Parent != nil.
- ParentSampleRate: the sample rate from the parent's Dynamic Sampling Context.

Update the default-sampling-context-platform and always-inherit-sampling-decision
includes to reflect these additions.

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

vercel Bot commented Apr 17, 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 17, 2026 9:00am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Apr 17, 2026 9:00am

Request Review

…ler example

The previous example only used ctx.ParentSampled, which reads as remote-only.
Show the two cases separately: ctx.Parent for local spans (same process) and
ctx.ParentSampled for remote spans (upstream service).

Co-Authored-By: Claude <noreply@anthropic.com>
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