Skip to content

otelzap: Add WithAttributes option#6962

Merged
dmathieu merged 4 commits into
open-telemetry:mainfrom
jade-guiton-dd:otelzap-scope-attributes
Mar 20, 2025
Merged

otelzap: Add WithAttributes option#6962
dmathieu merged 4 commits into
open-telemetry:mainfrom
jade-guiton-dd:otelzap-scope-attributes

Conversation

@jade-guiton-dd
Copy link
Copy Markdown
Contributor

Resolves #6954, see issue for context and solution design.

@jade-guiton-dd jade-guiton-dd requested review from a team and pellared as code owners March 19, 2025 12:45
@github-actions github-actions Bot requested a review from khushijain21 March 19, 2025 12:46
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.6%. Comparing base (06fa390) to head (8c0812e).
Report is 15 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #6962     +/-   ##
=======================================
- Coverage   75.6%   75.6%   -0.1%     
=======================================
  Files        207     207             
  Lines      19354   19362      +8     
=======================================
+ Hits       14646   14651      +5     
- Misses      4273    4275      +2     
- Partials     435     436      +1     
Files with missing lines Coverage Δ
bridges/otelzap/core.go 97.8% <100.0%> (+0.1%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

Thanks.

Comment thread CHANGELOG.md Outdated
Comment thread bridges/otelzap/core.go Outdated
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@dmathieu dmathieu merged commit 514586a into open-telemetry:main Mar 20, 2025
@pellared
Copy link
Copy Markdown
Member

@jade-guiton-dd, thank you

@pellared pellared added the bridge: zap Related to the zap bridge label Mar 25, 2025
@MrAlias MrAlias added this to the v1.36.0 milestone Mar 27, 2025
github-merge-queue Bot pushed a commit to open-telemetry/opentelemetry-collector that referenced this pull request May 30, 2025
…rWithAttributes (#13108)

#### Description

Now that `otelzap` has been bumped up to 0.11.0 (#13103), this PR
follows up on a TODO comment to use
open-telemetry/opentelemetry-go-contrib#6962 to
set instrumentation scope attributes on the Logger created by otelzap,
instead of a workaround (`LoggerProviderWithAttributes`).

This is an internal change, and the new code should be functionally
equivalent, so I don't think this needs a changelog.

#### Testing

I believe this is already covered by existing tests.
malus2077 pushed a commit to malus2077/opentelemetry-collector that referenced this pull request Jun 3, 2025
…rWithAttributes (open-telemetry#13108)

#### Description

Now that `otelzap` has been bumped up to 0.11.0 (open-telemetry#13103), this PR
follows up on a TODO comment to use
open-telemetry/opentelemetry-go-contrib#6962 to
set instrumentation scope attributes on the Logger created by otelzap,
instead of a workaround (`LoggerProviderWithAttributes`).

This is an internal change, and the new code should be functionally
equivalent, so I don't think this needs a changelog.

#### Testing

I believe this is already covered by existing tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bridge: zap Related to the zap bridge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bridges/otelzap] Option to set instrumentation scope attributes

5 participants