You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The default tracer is configured via environment variables, and will always
// be non-nil. If any of the environment variables are invalid, the
// corresponding errors will be logged to stderr and the default values will be
// used instead.
However, at the moment, if creating the transport fails (e.g. beause the URL is invalid) the default URL (http://localhost:8200) is not used -- instead, we use a transport that discards all data:
Another problem is that the agent will be "active", meaning that it will create transactions and spans and inject their trace context into headers, but the events will be discarded - so distributed traces will always be broken.
If we were to change the code to match the comment, distributed traces would still be broken unless the expected URL happened to be http://localhost:8200, which seems unlikely. I think instead we should:
set the tracer to be inactive rather than just using a discard transport
update the DefaultTracer comment to mention that if the transport-specific config vars are invalid, then we'll deactivate the tracer
The text was updated successfully, but these errors were encountered:
Hi @axw,
I hope this message finds you well. I'm reaching out to express my interest in contributing to the resolution of this bug. I noticed this particular issue and wanted to inquire if anyone is currently working on it. If not, I would like to take it up!
The documentation for apm.DefaultTracer says:
However, at the moment, if creating the transport fails (e.g. beause the URL is invalid) the default URL (
http://localhost:8200
) is not used -- instead, we use a transport that discards all data:apm-agent-go/tracer.go
Lines 315 to 317 in 2e6d3cf
Another problem is that the agent will be "active", meaning that it will create transactions and spans and inject their trace context into headers, but the events will be discarded - so distributed traces will always be broken.
If we were to change the code to match the comment, distributed traces would still be broken unless the expected URL happened to be
http://localhost:8200
, which seems unlikely. I think instead we should:The text was updated successfully, but these errors were encountered: