Skip to content

Traceparent option#4874

Merged
dehaansa merged 19 commits intografana:mainfrom
MyDigitalLife:traceparent-option
Nov 20, 2025
Merged

Traceparent option#4874
dehaansa merged 19 commits intografana:mainfrom
MyDigitalLife:traceparent-option

Conversation

@MyDigitalLife
Copy link
Contributor

PR Description

This change enables the user to propagate the traceparent header. This allows the user to trace a call from alloy to other services like Mimir. I made it a optional setting that is false by default to not change the current way it work.

Which issue(s) this PR fixes

Fixes ##2521

Notes to the Reviewer

PR Checklist

  • [ x] CHANGELOG.md updated
  • [ x] Documentation added

@CLAassistant
Copy link

CLAassistant commented Nov 18, 2025

CLA assistant check
All committers have signed the CLA.

@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Nov 18, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for propagating the traceparent header from Alloy to downstream services like Mimir, enabling distributed tracing across service boundaries. The feature is implemented as an optional configuration flag that defaults to false to maintain backward compatibility.

  • Adds send_traceparent boolean option to the tracing configuration block
  • Configures OpenTelemetry's global text map propagator with TraceContext and Baggage propagators when enabled
  • Updates documentation and changelog to reflect the new feature

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
internal/runtime/tracing/tracing.go Adds SendTraceparent field to Options struct and configures global OTEL propagator in New() and Update() methods
docs/sources/reference/config-blocks/tracing.md Documents the new send_traceparent configuration option with description and example usage
CHANGELOG.md Records the addition of the new traceparent propagation feature

MyDigitalLife and others added 2 commits November 19, 2025 09:11
Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>
Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>
MyDigitalLife and others added 3 commits November 19, 2025 09:28
Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>
Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>
@dehaansa dehaansa merged commit 3c4b4f6 into grafana:main Nov 20, 2025
39 checks passed
dehaansa pushed a commit to madhub/alloy that referenced this pull request Dec 10, 2025
* Added an option to enable the sending to traceparent headers

* Updated CHANGELOG.md

* Fixed typo

* Update docs/sources/reference/config-blocks/tracing.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove duplicate code and fix changing of send_traceparent option

* Improved

* Moved to 1 append call

* Improved naming

* Improved naming

* Update internal/runtime/tracing/tracing.go

Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>

* Update internal/runtime/tracing/tracing.go

Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>

* Update internal/runtime/tracing/tracing.go

Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age type/docs Docs Squad label across all Grafana Labs repos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants