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

[pdata] Update values returned by all String methods of enum types #6250

Merged
merged 1 commit into from Nov 4, 2022

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented Oct 6, 2022

Update values returned by all String methods of enum types to a consistent short form representing the enum identifier.

The following methods don't rely on proto enum constant names anymore and return values consistent with other pdata enums:

  • plog.SeverityNumber.String() now returns:

    • SeverityNumberUnspecified -> "Unspecified"
    • SeverityNumberTrace -> "Trace"
    • SeverityNumberTrace2 -> "Trace2"
    • SeverityNumberTrace3 -> "Trace3"
    • SeverityNumberTrace4 -> "Trace4"
    • SeverityNumberDebug -> "Debug"
    • SeverityNumberDebug2 -> "Debug2"
    • SeverityNumberDebug3 -> "Debug3"
    • SeverityNumberDebug4 -> "Debug4"
    • SeverityNumberInfo -> "Info"
    • SeverityNumberInfo2 -> "Info2"
    • SeverityNumberInfo3 -> "Info3"
    • SeverityNumberInfo4 -> "Info4"
    • SeverityNumberWarn -> "Warn"
    • SeverityNumberWarn2 -> "Warn2"
    • SeverityNumberWarn3 -> "Warn3"
    • SeverityNumberWarn4 -> "Warn4"
    • SeverityNumberError -> "Error"
    • SeverityNumberError2 -> "Error2"
    • SeverityNumberError3 -> "Error3"
    • SeverityNumberError4 -> "Error4"
    • SeverityNumberFatal -> "Fatal"
    • SeverityNumberFatal2 -> "Fatal2"
    • SeverityNumberFatal3 -> "Fatal3"
    • SeverityNumberFatal4 -> "Fatal4"
  • ptrace.SpanKind.String() now returns:

    • SpanKindUnspecified -> "Unspecified"
    • SpanKindInternal -> "Internal"
    • SpanKindServer -> "Server"
    • SpanKindClient -> "Client"
    • SpanKindProducer -> "Producer"
    • SpanKindConsumer -> "Consumer"
  • ptrace.StatusCode.String() now returns:

    • StatusCodeUnset -> "Unset"
    • StatusCodeOk -> "Ok"
    • StatusCodeError -> "Error"

This change represents the approach A described in #6251

@dmitryax dmitryax changed the title Update other names [pdata] Update values returned by all String methods of enum types Oct 6, 2022
@dmitryax dmitryax force-pushed the update-other-names branch 4 times, most recently from 2d9ad3c to d60e6ef Compare October 14, 2022 21:31
@dmitryax dmitryax marked this pull request as ready for review October 14, 2022 21:32
@dmitryax dmitryax requested a review from a team as a code owner October 14, 2022 21:32
@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Base: 91.86% // Head: 91.93% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (e950650) compared to base (62f4388).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6250      +/-   ##
==========================================
+ Coverage   91.86%   91.93%   +0.06%     
==========================================
  Files         237      237              
  Lines       13620    13694      +74     
==========================================
+ Hits        12512    12589      +77     
+ Misses        879      876       -3     
  Partials      229      229              
Impacted Files Coverage Δ
pdata/plog/logs.go 100.00% <100.00%> (+4.00%) ⬆️
pdata/ptrace/traces.go 100.00% <100.00%> (+8.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dmitryax dmitryax marked this pull request as draft October 14, 2022 23:35
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 29, 2022
@dmitryax dmitryax removed the Stale label Nov 1, 2022
dmitryax added a commit to dmitryax/opentelemetry-collector-contrib that referenced this pull request Nov 2, 2022
[SpanKind|StatusCode].String() will be changed to return different string values. This change replaces existing method calls with contrib internal functions to avoid breaking changes when open-telemetry/opentelemetry-collector#6250 is merged
@dmitryax dmitryax marked this pull request as ready for review November 2, 2022 01:00
dmitryax added a commit to dmitryax/opentelemetry-collector-contrib that referenced this pull request Nov 2, 2022
[SpanKind|StatusCode].String() will be changed to return different string values. This change replaces existing method calls with contrib internal functions to avoid breaking changes when open-telemetry/opentelemetry-collector#6250 is merged
Update values returned by all String methods of enum types to a consistent short form representing the enum identifier
dmitryax added a commit to dmitryax/opentelemetry-collector-contrib that referenced this pull request Nov 2, 2022
[SpanKind|StatusCode].String() will be changed to return different string values. This change replaces existing method calls with contrib internal functions to avoid breaking changes when open-telemetry/opentelemetry-collector#6250 is merged
dmitryax added a commit to dmitryax/opentelemetry-collector-contrib that referenced this pull request Nov 2, 2022
[SpanKind|StatusCode].String() will be changed to return different string values. This change replaces existing method calls with contrib internal functions to avoid breaking changes when open-telemetry/opentelemetry-collector#6250 is merged
@dmitryax
Copy link
Member Author

dmitryax commented Nov 2, 2022

@bogdandrutu this is ready for review

dmitryax added a commit to dmitryax/opentelemetry-collector-contrib that referenced this pull request Nov 2, 2022
[SpanKind|StatusCode].String() will be changed to return different string values. This change replaces existing method calls with contrib internal functions to avoid breaking changes when open-telemetry/opentelemetry-collector#6250 is merged
@bogdandrutu bogdandrutu merged commit 6b27644 into open-telemetry:main Nov 4, 2022
@dmitryax
Copy link
Member Author

dmitryax commented Nov 4, 2022

@bogdandrutu curious why this repo started creating merge commits recently?

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.

None yet

2 participants