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

Standardize TraceId/SpandId/TraceFlags field casing in log formats #1283

Conversation

tigrannajaryan
Copy link
Member

OTLP/JSON is currently using trace_id, span_id field naming. The snake case
with underscores comes from Protobuf/JSON mapping rules.

Elsewhere we were previously using traceid, spanid, traceflags without underscores.

This changes standardizes field names to use underscores for all text log mediums
where these fields may be recorded.

Note: the alternate approach, i.e. keeping traceid, spanid, traceflags and renaming
them in OTLP/JSON would result in OTLP/JSON format having an inconsistent naming,
since all other fields use snake casing.

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.

+1

@tigrannajaryan tigrannajaryan added the spec:logs Related to the specification/logs directory label Dec 10, 2020
OTLP/JSON is currently using trace_id, span_id field naming. The snake case
with underscores comes from Protobuf/JSON mapping rules.

Elsewhere we were previously using traceid, spanid, traceflags without underscores.

This changes standardizes field names to use underscores for all text log mediums
where these fields may be recorded.

Note: the alternate approach, i.e. keeping traceid, spanid, traceflags and renaming
them in OTLP/JSON would result in OTLP/JSON format having an inconsistent naming,
since all other fields use snake casing.
@tigrannajaryan tigrannajaryan merged commit 7fb1f01 into open-telemetry:master Dec 14, 2020
@tigrannajaryan tigrannajaryan deleted the feature/tigran/log-field-names branch December 14, 2020 20:08
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
…pen-telemetry#1283)

OTLP/JSON is currently using trace_id, span_id field naming. The snake case
with underscores comes from Protobuf/JSON mapping rules.

Elsewhere we were previously using traceid, spanid, traceflags without underscores.

This changes standardizes field names to use underscores for all text log mediums
where these fields may be recorded.

Note: the alternate approach, i.e. keeping traceid, spanid, traceflags and renaming
them in OTLP/JSON would result in OTLP/JSON format having an inconsistent naming,
since all other fields use snake casing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:logs Related to the specification/logs directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants