Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Datadog Tracer v1.48.0 WARN: Won't propagate tag: maximum trace tags header len (128) reached. #2847

Closed
cesarvspr opened this issue Sep 9, 2024 · 1 comment
Assignees

Comments

@cesarvspr
Copy link

cesarvspr commented Sep 9, 2024

Version of dd-trace-go

v1.48.0

Describe what happened:

Code:

          err := tracer.Inject(span.Context(), tracer.HTTPHeadersCarrier(c.Writer.Header()))
		if err != nil {
			logger.Error(fmt.Sprintf("Failed to inject trace in response: %s", err.Error()))
		}

I see the internal tracer lib logging:


Datadog Tracer v1.48.0 WARN: Won't propagate tag: maximum trace tags header len (128) reached.

err was nil and my logger was not called.

Describe what you expected:

Ideally, a method would allow the validation of span before injection or some way to suppress this log.

Steps to reproduce the issue:

Inject an invalid span.

Additional environment details (Version of Go, Operating System, etc.):

@cesarvspr cesarvspr added the bug unintended behavior that has to be fixed label Sep 9, 2024
@github-actions github-actions bot added the needs-triage New issues that have not yet been triaged label Sep 9, 2024
@mtoffl01 mtoffl01 self-assigned this Sep 13, 2024
@mtoffl01
Copy link
Contributor

mtoffl01 commented Sep 13, 2024

The warning implies that some of the information relevant to distributed tracing is getting dropped because we've hit the "maximum trace tags header" size limit (of 128). All information (e.g, tags) up to the point where the limit was reached will not be impacted and trace injection will still occur. It's possible you'll see some impact on the stability of distributed tracing — e.g, if a sampling decision tag gets dropped, then you may see unexpected gaps in your trace — but the presence of the warning does not mean trace injection will fail.

This behavior could happen for a perfectly valid span.

A quick fix for this would be to set the env var DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH to a value greater than 128 but less than 512. If this does not address the problem, please open up a Support Ticket with information on the service you're instrumenting and how you're generating the "invalid" span, along with a link to this github issue.

@mtoffl01 mtoffl01 removed needs-triage New issues that have not yet been triaged bug unintended behavior that has to be fixed labels Sep 16, 2024
@darccio darccio closed this as completed Oct 1, 2024
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

No branches or pull requests

3 participants