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

log: Add design doc #4809

Merged
merged 90 commits into from
Feb 9, 2024
Merged

Conversation

pellared
Copy link
Member

@pellared pellared commented Jan 2, 2024

First part of #3827

Fixes #4696

Prototype: #4725 (use it for reference when reviewing).

@pellared pellared changed the title Logs bridge part 1 log: Add logs bridge design doc Jan 2, 2024
@pellared pellared changed the title log: Add logs bridge design doc log: Add design doc Jan 2, 2024
@pellared pellared added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jan 2, 2024
@pellared pellared marked this pull request as ready for review January 2, 2024 17:42
@pellared pellared mentioned this pull request Jan 2, 2024
@pellared pellared self-assigned this Jan 2, 2024
log/DESIGN.md Outdated Show resolved Hide resolved
log/DESIGN.md Outdated Show resolved Hide resolved
log/DESIGN.md Outdated Show resolved Hide resolved
log/DESIGN.md Show resolved Hide resolved
log/DESIGN.md Show resolved Hide resolved
log/DESIGN.md Show resolved Hide resolved
log/DESIGN.md Outdated Show resolved Hide resolved
log/DESIGN.md Outdated Show resolved Hide resolved
log/DESIGN.md Outdated Show resolved Hide resolved
log/DESIGN.md Outdated Show resolved Hide resolved
@pellared pellared requested a review from MrAlias January 3, 2024 09:41
log/DESIGN.md Outdated Show resolved Hide resolved
Co-authored-by: Benjamin Sanabria Carr <carrbens@gmail.com>
hanyuancheung
hanyuancheung previously approved these changes Jan 6, 2024
log/DESIGN.md Outdated Show resolved Hide resolved
log/DESIGN.md Outdated Show resolved Hide resolved
@pellared pellared mentioned this pull request Jan 9, 2024
11 tasks
@pellared pellared requested a review from dashpole January 9, 2024 09:42
@pellared
Copy link
Member Author

pellared commented Feb 2, 2024

@jba Thanks a lot for your review 👍 Your (and others) feedback are welcome.

@pellared pellared requested a review from jba February 2, 2024 20:42
log/DESIGN.md Outdated Show resolved Hide resolved
Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

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

Thanks for all of your work on this @pellared!

log/DESIGN.md Show resolved Hide resolved
@MrAlias
Copy link
Contributor

MrAlias commented Feb 8, 2024

Plan is to merge this tomorrow unless there is more comments/feedback.

Copy link

codecov bot commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cfaf1f0) 82.6% compared to head (f72a6ed) 82.6%.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #4809   +/-   ##
=====================================
  Coverage   82.6%   82.6%           
=====================================
  Files        232     232           
  Lines      18870   18870           
=====================================
+ Hits       15603   15605    +2     
+ Misses      2977    2975    -2     
  Partials     290     290           

see 1 file with indirect coverage changes

@pellared
Copy link
Member Author

pellared commented Feb 9, 2024

@peterbourgon @MrAlias @jack-berg @dashpole @carrbs @MadVikingGod @tigrannajaryan @jba thank you a lot for your help.

@pellared pellared merged commit c921815 into open-telemetry:main Feb 9, 2024
30 checks passed
@pellared pellared deleted the logs-bridge-part-1 branch February 9, 2024 07:27
@MrAlias MrAlias added the area:logs Part of OpenTelemetry logs label Feb 12, 2024
@MrAlias MrAlias added this to the v1.24.0 milestone Feb 22, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logs Part of OpenTelemetry logs Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Logs Bridge API design
10 participants