Skip to content

Conversation

jdelStrother
Copy link

Issue # (if available)

Followup to #307

Description of changes

trace.id/span.id are useful in NewRelic for tying log messages to specific transactions, but they're always nil with the current newrelic log formatter. You can get them from NewRelic::Agent.linking_metadata, but it's thread-local data, so trying to do so from the background logger thread is too late.
Instead, store it on the Log instance as soon as a log message is created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

These let NewRelic tie log messages to specific transactions. They're thread-local, so trying to capture them from an async appender thread would return nil
@jdelStrother
Copy link
Author

Anything I can do to help get this merged?

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