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

Encode logger metadata as string. #127

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

aselder
Copy link
Contributor

@aselder aselder commented Dec 3, 2020

This avoid a potential issue where JSON logs are parsed and numbers are
treated as floats. This can lead to the trace and span ids losing
precision when read from JSON.

If you look at the DataDog docs for other languages, you can see this.
See: https://docs.datadoghq.com/tracing/connect_logs_and_traces/ruby/

Fixes #126

This avoid a potential issue where JSON logs are parsed and numbers are
treated as floats. This can lead to the trace and span ids losing
precision when read from JSON.

If you look at the DataDog docs for other languages, you can see this.
See: https://docs.datadoghq.com/tracing/connect_logs_and_traces/ruby/
@aselder
Copy link
Contributor Author

aselder commented Dec 3, 2020

More or less a dup of #117

@zachdaniel zachdaniel merged commit 6cf608f into spandex-project:master Dec 10, 2020
@aselder aselder deleted the logger-metadata-strings branch November 2, 2022 06:25
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.

BUG: Spandex should encode trace_id/span_ids as strings in Logger metadata
2 participants