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

Add otelTraceSampled field to LogEntry for OLTP Logging Instrumentation module #1765

Closed
bitnahian opened this issue Apr 18, 2023 · 3 comments · Fixed by #1773
Closed

Add otelTraceSampled field to LogEntry for OLTP Logging Instrumentation module #1765

bitnahian opened this issue Apr 18, 2023 · 3 comments · Fixed by #1773
Labels
feature-request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bitnahian
Copy link
Contributor

Before opening a feature request against this repo, consider whether the feature should/could be implemented in the other OpenTelemetry client libraries. If so, please open an issue on opentelemetry-specification first.

Is your feature request related to a problem?
Getting span id and trace id in the log record is a must. Cloud provider libraries, e.g. Google Cloud Logging also provides a logging.googleapis.com/trace_sampled field under structured logging, which can be populated using this library.

Describe the solution you'd like
Add a record.otelTraceSampled field similar to record.otelSpanID and record.otelTraceID in the log entry using the trace_flags property in SpanContext.

Describe alternatives you've considered
Manually injecting the value of trace_flags property into the log record by using the current SpanContext.

@srikanthccv
Copy link
Member

Feel free to send a pull request.

@srikanthccv srikanthccv added good first issue Good for newcomers help wanted Extra attention is needed labels Apr 20, 2023
@msaad7777
Copy link

Hi there,

I would like to help out with this feature request. As a contributor, I can see the importance of including the span id and trace id in the log record. I have experience with OpenTelemetry and would be happy to work on implementing this feature.

Please let me know if this issue is still available and if there are any guidelines or resources I should follow while working on it. Thank you!

@bitnahian
Copy link
Contributor Author

Hi @msaad777, I’ve made some changes and will be pushing a PR soon. I’ll update here if I’m unable to make a PR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants