Skip to content

Conversation

@thompson-tomo
Copy link
Contributor

Fixes #4735

Changes

This removes the resource and instrument scope fields from the log data model as they are not fields on the log record but rather higher level otlp fields.

For non-trivial changes, follow the change proposal process.

@thompson-tomo thompson-tomo requested review from a team as code owners December 7, 2025 02:24
Copy link
Contributor

@jsuereth jsuereth left a comment

Choose a reason for hiding this comment

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

I'm not sure I understand this PR.

DataModel != OTLP. We encode things into OTLP where the data model may not exactly match how things are encoded in OTLP, as OTLP is a protocol. We may have different protocols in the future where things are structured differently, but logs will still need a Resource + instrumentation scope.

I do not think this should be removed.

cc @jack-berg / @tigrannajaryan for thoughts.

@thompson-tomo
Copy link
Contributor Author

The key thing the page says

Here is the list of fields in a log record:

The 2 fields removed are not in fact fields in the log record as discussed with @pellared who is the sponsor of changes based on the linked issue.

If you look at metrics https://opentelemetry.io/docs/specs/otel/metrics/data-model/#opentelemetry-protocol-data-model there it mentions the metric is identified based on resource/scope with the metric defined using a collection of properties which doesn't include resource/scope. Logs are no different.

@pellared
Copy link
Member

pellared commented Dec 8, 2025

The 2 fields removed are not in fact fields in the log record as discussed with @pellared who is the sponsor of changes based on the linked issue.

There should be something which describes the record's relationship to instrumentation scope and resource.

Also notice the lint errors from https://github.com/open-telemetry/opentelemetry-specification/actions/runs/19997659863/job/57347719833?pr=4783:

[home/repo/specification/logs/api.md]:
Error:  file:///home/repo/specification/logs/data-model.md#field-instrumentationscope | Cannot find fragment: Fragment not found in document. Check if fragment exists or page structure

[home/repo/specification/logs/README.md]:
Error:  file:///home/repo/specification/logs/data-model.md#field-resource | Cannot find fragment: Fragment not found in document. Check if fragment exists or page structure

[home/repo/specification/logs/sdk.md]:
Error:  file:///home/repo/specification/logs/data-model.md#field-instrumentationscope | Cannot find fragment: Fragment not found in document. Check if fragment exists or page structure
Error:  file:///home/repo/specification/logs/data-model.md#field-resource | Cannot find fragment: Fragment not found in document. Check if fragment exists or page structure

If you look at metrics https://opentelemetry.io/docs/specs/otel/metrics/data-model/#opentelemetry-protocol-data-model there it mentions the metric is identified based on resource/scope with the metric defined using a collection of properties which doesn't include resource/scope. Logs are no different.

The Data Model specification structure is different for Metrics and Logs. Do you want to unify the document structure?

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.

The log record fields in data model is not aligned with proto

3 participants