Allow configuring Micrometer Tracing MDC keys#50595
Open
philsttr wants to merge 1 commit into
Open
Conversation
Allow the user to configure the names of the MDC keys in which the trace id and span id are stored when using Micrometer Tracing. Introduce the following new properties: - management.tracing.mdc.trace-id-key (default: "traceId") - management.tracing.mdc.span-id-key (default: "spanId") The properties are honored by both the Brave and OpenTelemetry Micrometer Tracing bridges. The default key names keep backwards compatibility with the previously hardcoded values. Signed-off-by: Phil Clay <philsttr@users.noreply.github.com>
Member
|
Why do you want the keys to be configurable? What would configuring them allow you to do that currently isn't possible or isn't as concise as you'd like? |
Author
|
Some ecosystems use Allowing the keys to be configurable (as supported in Micrometer Tracing) allows users to use the same names already in use in those ecosystems. This helps when enabling tracing in Spring Boot apps where a naming pattern has already been established. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow the user to configure the names of the MDC keys in which the trace id and span id are stored when using Micrometer Tracing. For example, to use
trace_id/span_idinstead oftraceId/spanIdIntroduce the following new properties:
management.tracing.mdc.trace-id-key(default:traceId)management.tracing.mdc.span-id-key(default:spanId)The default key names keep backwards compatibility with the previously hardcoded values.
Autoconfigurations for both the Brave and OpenTelemetry Micrometer Tracing bridges honor the new properties.