Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Add support for correlating traces and logs. #123

Closed
sebright opened this issue Jun 15, 2018 · 3 comments
Closed

Add support for correlating traces and logs. #123

sebright opened this issue Jun 15, 2018 · 3 comments
Assignees
Labels

Comments

@sebright
Copy link
Contributor

One approach is to add trace IDs, span IDs, or other fields from the current span to log entries that are created with existing logging frameworks. I am currently experimenting with this feature in opencensus-java (census-instrumentation/opencensus-java#1212), but I think we should design a feature that can be supported across multiple languages and include it in opencensus-specs.

@sebright
Copy link
Contributor Author

sebright commented Sep 4, 2018

@sebright
Copy link
Contributor Author

sebright commented Sep 4, 2018

One issue that came up was deciding how to name the keys for the tracing data, when the logging framework supports adding arbitrary key-value pairs to log entries. We should probably standardize the key names. See the discussion at census-instrumentation/opencensus-java#1371 (comment).

The Log4j log correlation library currently uses the keys openCensusTraceId, openCensusSpanId, and openCensusTraceSampled. There is also a feature request to allow customizing the key names: census-instrumentation/opencensus-java#1389.

sebright added a commit to sebright/opencensus-specs that referenced this issue Sep 20, 2018
…mentation#123).

The specification only covers aspects of log correlation that are likely to be
shared by log correlation implementations for multiple languages and logging
frameworks.  It is based on the experimental log correlation libraries in
opencensus-java:

https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/stackdriver
https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/log4j2
sebright added a commit to sebright/opencensus-specs that referenced this issue Sep 20, 2018
…mentation#123).

The specification only covers aspects of log correlation that are likely to be
shared by log correlation implementations for multiple languages and logging
frameworks.  It is based on the experimental log correlation libraries in
opencensus-java:

https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/stackdriver
https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/log4j2
sebright added a commit to sebright/opencensus-specs that referenced this issue Sep 20, 2018
…mentation#123).

The specification only covers aspects of log correlation that are likely to be
shared by log correlation implementations for multiple languages and logging
frameworks.  It is based on the experimental log correlation libraries in
opencensus-java:

https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/stackdriver
https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/log4j2
sebright added a commit to sebright/opencensus-specs that referenced this issue Sep 20, 2018
…mentation#123).

The specification only covers aspects of log correlation that are likely to be
shared by log correlation implementations for multiple languages and logging
frameworks.  It is based on the experimental log correlation libraries in
opencensus-java:

https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/stackdriver
https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/log4j2
sebright added a commit to sebright/opencensus-specs that referenced this issue Sep 25, 2018
…mentation#123).

The specification only covers aspects of log correlation that are likely to be
shared by log correlation implementations for multiple languages and logging
frameworks.  It is based on the experimental log correlation libraries in
opencensus-java:

https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/stackdriver
https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/log4j2
sebright added a commit to sebright/opencensus-specs that referenced this issue Sep 28, 2018
…mentation#123).

The specification only covers aspects of log correlation that are likely to be
shared by log correlation implementations for multiple languages and logging
frameworks.  It is based on the experimental log correlation libraries in
opencensus-java:

https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/stackdriver
https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/log4j2
sebright added a commit to sebright/opencensus-specs that referenced this issue Oct 8, 2018
…mentation#123).

The specification only covers aspects of log correlation that are likely to be
shared by log correlation implementations for multiple languages and logging
frameworks.  It is based on the experimental log correlation libraries in
opencensus-java:

https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/stackdriver
https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/log4j2
sebright added a commit that referenced this issue Oct 9, 2018
The specification only covers aspects of log correlation that are likely to be
shared by log correlation implementations for multiple languages and logging
frameworks.  It is based on the experimental log correlation libraries in
opencensus-java:

https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/stackdriver
https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/log_correlation/log4j2
@sebright
Copy link
Contributor Author

sebright commented Oct 9, 2018

Closing, since #181 added log correlation, and #195 covers key naming.

@sebright sebright closed this as completed Oct 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants