Skip to content

Conversation

@MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Aug 1, 2025

Fix #7576

Changes

Severity

  • Add the String method to implement fmt.Stringer
  • Add the MarshalText method to implement encoding.TextMarshaler
  • Add the UnmarshalText method to implement encoding.TextUnmarshaler
  • Add the AppendText method to implement encoding.TextAppender
  • Add the MarshalJSON method to implement json.Marshaler
  • Add the UnmarshalJSON method to implement json.Unmarshaler

SeverityVar

  • Add the String method to implement fmt.Stringer
  • Add the MarshalText method to implement encoding.TextMarshaler
  • Add the UnmarshalText method to implement encoding.TextUnmarshaler
  • Add the AppendText method to implement encoding.TextAppender

Tests

  • Add tests for all added methods
  • Add example test to exemplify JSON parsing
  • Update example test for environment variable parsing to use the new unmarshal functionality

@MrAlias MrAlias added this to the v1.38.0 milestone Aug 1, 2025
@codecov
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.9%. Comparing base (49bf21e) to head (2711649).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #7652     +/-   ##
=======================================
+ Coverage   78.7%   78.9%   +0.1%     
=======================================
  Files        186     186             
  Lines      14702   14819    +117     
=======================================
+ Hits       11582   11699    +117     
  Misses      2780    2780             
  Partials     340     340             
Files with missing lines Coverage Δ
processors/minsev/severity.go 100.0% <100.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MrAlias MrAlias force-pushed the minsev-str branch 5 times, most recently from 2db2ae9 to ba650f2 Compare August 3, 2025 15:25
@MrAlias MrAlias changed the title Support text interchange with minsev Severity Support text interchange with minsev severity Aug 3, 2025
@MrAlias MrAlias marked this pull request as ready for review August 3, 2025 15:56
@MrAlias MrAlias requested a review from a team as a code owner August 3, 2025 15:56
Copy link
Contributor

@sahidvelji sahidvelji left a comment

Choose a reason for hiding this comment

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

Solid PR. Thank you! Left a few minor comments.

@pellared pellared requested a review from sahidvelji August 4, 2025 14:51
@MrAlias MrAlias merged commit 14aef57 into open-telemetry:main Aug 11, 2025
28 checks passed
@MrAlias MrAlias deleted the minsev-str branch August 11, 2025 19:00
@MrAlias MrAlias mentioned this pull request Aug 29, 2025
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.

minsev: Severity and SeverityVar should implement string-related interfaces

4 participants