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

api: replace StatusCode and message with Status #760

Merged
merged 2 commits into from Mar 13, 2022

Conversation

jtescher
Copy link
Member

The spec defines status as unset, ok, or error with a description. The current api allows for confusion and misuse by providing invalid combinations (e.g. Ok with a description). This change simplifies the api and removes these illegal states by moving the status to be an enum where only the Status::Error case accepts a message.

@codecov
Copy link

codecov bot commented Mar 13, 2022

Codecov Report

Merging #760 (a62ae72) into main (0704793) will decrease coverage by 0.1%.
The diff coverage is 84.6%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #760     +/-   ##
=======================================
- Coverage   69.8%   69.6%   -0.2%     
=======================================
  Files        109     109             
  Lines       8868    8824     -44     
=======================================
- Hits        6192    6150     -42     
+ Misses      2676    2674      -2     
Impacted Files Coverage Δ
opentelemetry-api/src/global/trace.rs 35.1% <0.0%> (ø)
opentelemetry-api/src/testing/trace.rs 45.0% <0.0%> (+2.1%) ⬆️
opentelemetry-api/src/trace/context.rs 46.4% <0.0%> (-2.7%) ⬇️
opentelemetry-api/src/trace/mod.rs 70.2% <ø> (ø)
opentelemetry-api/src/trace/noop.rs 66.3% <0.0%> (ø)
opentelemetry-api/src/trace/tracer.rs 61.3% <33.3%> (+0.2%) ⬆️
opentelemetry-datadog/src/exporter/model/v03.rs 87.0% <50.0%> (ø)
opentelemetry-datadog/src/exporter/model/v05.rs 86.4% <50.0%> (ø)
opentelemetry-jaeger/src/exporter/mod.rs 54.2% <95.2%> (-2.7%) ⬇️
opentelemetry-sdk/src/trace/span.rs 93.4% <95.8%> (-0.3%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0704793...a62ae72. Read the comment docs.

The spec defines status as unset, ok, or error with a description. The
current api allows for confusion and misuse by providing invalid
combinations (e.g. Ok with a description). This change simplifies the
api and removes these illegal states by moving the status to be an enum
where only the `Status::Error` case accepts a message.
Copy link
Contributor

@TommyCpp TommyCpp left a comment

Choose a reason for hiding this comment

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

👍

# Conflicts:
#	opentelemetry-jaeger/src/exporter/mod.rs
@jtescher jtescher merged commit 535a1d9 into open-telemetry:main Mar 13, 2022
@jtescher jtescher deleted the status branch March 13, 2022 21:16
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