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 String method to Value and KeyValue #5117

Merged
merged 5 commits into from
Apr 2, 2024

Conversation

pellared
Copy link
Member

@pellared pellared commented Mar 29, 2024

Fixes #4952

Implementation based on: https://pkg.go.dev/log/slog#Value.String and https://pkg.go.dev/log/slog#Attr.String.

Comment that it is for debugging purpose only inspired by https://pkg.go.dev/time#Time.String

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 83.8%. Comparing base (b7fdeb9) to head (664c409).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #5117     +/-   ##
=======================================
- Coverage   83.8%   83.8%   -0.1%     
=======================================
  Files        248     248             
  Lines      16253   16275     +22     
=======================================
+ Hits       13625   13643     +18     
- Misses      2340    2344      +4     
  Partials     288     288             
Files Coverage Δ
log/keyvalue.go 96.7% <90.9%> (-1.0%) ⬇️

... and 1 file with indirect coverage changes

@pellared pellared marked this pull request as ready for review March 29, 2024 09:15
@pellared pellared self-assigned this Mar 29, 2024
@pellared pellared added area:logs Part of OpenTelemetry logs pkg:API Related to an API package labels Mar 29, 2024
log/keyvalue.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
pellared and others added 2 commits March 29, 2024 17:49
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@pellared pellared requested a review from MrAlias March 29, 2024 16:54
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

🚀

@pellared pellared merged commit e6e44de into open-telemetry:main Apr 2, 2024
26 checks passed
@MrAlias MrAlias added this to the v1.25.0 milestone Apr 3, 2024
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 pkg:API Related to an API package
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

log: Implement Stringer for Value and KeyValue
4 participants