Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Add a structured way to extract traces for logging #118

Merged
merged 1 commit into from
Mar 19, 2017
Merged

Add a structured way to extract traces for logging #118

merged 1 commit into from
Mar 19, 2017

Conversation

akshayjshah
Copy link
Contributor

Since opentracing implementations differ in how they represent tracing data
(e.g., not all implementation use span and trace IDs), there isn't a generic way
to add tracing information to log messages. This PR adds a small utility to
Jaeger's zap integration that extracts structured data from a context.Context.

This is an exact clone of the code currently in UberFX's ulog package; for
easy re-usability, I think that this is a better place for it. I'm happy to
remove the code in UberFX once this lands.

Since opentracing implementations differ in how they represent tracing data
(e.g., not all implementation use span and trace IDs), there isn't a generic way
to add tracing information to log messages. This PR adds a small utility to
Jaeger's zap integration that extracts structured data from a context.Context.

This is an exact clone of the code currently in UberFX's `ulog` package; for
easy re-usability, I think that this is a better place for it. I'm happy to
remove the code in UberFX once this lands.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 83.255% when pulling b72502a on akshayjshah:ajs-field into 42d26ac on uber:master.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

lgtm

@akshayjshah
Copy link
Contributor Author

Thanks for the quick review! I don't have write access to this repo, so you'll have to merge.

@yurishkuro yurishkuro merged commit 709b40e into jaegertracing:master Mar 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants