Fix Resource field type in Logs Data Model#3826
Merged
tigrannajaryan merged 2 commits intoopen-telemetry:mainfrom Jan 18, 2024
Merged
Fix Resource field type in Logs Data Model#3826tigrannajaryan merged 2 commits intoopen-telemetry:mainfrom
tigrannajaryan merged 2 commits intoopen-telemetry:mainfrom
Conversation
djaglowski
approved these changes
Jan 16, 2024
jmacd
approved these changes
Jan 16, 2024
tigrannajaryan
approved these changes
Jan 16, 2024
trask
approved these changes
Jan 17, 2024
jack-berg
approved these changes
Jan 17, 2024
Member
|
This has been open for 2 days, has enough approvals, merging. |
carlosalberto
pushed a commit
to carlosalberto/opentelemetry-specification
that referenced
this pull request
Oct 31, 2024
## Changes Change the type of `Resource` to reference the definition in the SDK so that the resource's scheme URL is included in logs data model. ## Why The Logs Data Model misses scheme URL of resource. All of the languages reuse a common type representing resource. - Java (stable logs): [reuses a common resource type](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/data/LogRecordData.java) - .NET (stable logs): [reuses a common resource type](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/OtlpLogRecordTransformer.cs) - C++ (stable logs): [reuses a common resource type](https://github.com/open-telemetry/opentelemetry-cpp/blob/main/sdk/src/logs/read_write_log_record.cc) - Python (experimental logs): [reuses a common resource type](https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py) These changes can be seen as breaking. However, there is 100% precedence of how log attributes and resource are currently handled in all languages. I see the current description as a bug because we would miss scheme URL of the resource. AFAIK the intention of the OTel Logs Specification authors was to have only nested values for Body and Attributes. Related PRs: - open-telemetry#2888 - open-telemetry/opentelemetry-go#4809
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Change the type of
Resourceto reference the definition in the SDK so that the resource's scheme URL is included in logs data model.Why
The Logs Data Model misses scheme URL of resource. All of the languages reuse a common type representing resource.
These changes can be seen as breaking. However, there is 100% precedence of how log attributes and resource are currently handled in all languages. I see the current description as a bug because we would miss scheme URL of the resource. AFAIK the intention of the OTel Logs Specification authors was to have only nested values for Body and Attributes.
Related PRs: