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

Zipkin - exclude status code if unset #382

Merged
merged 1 commit into from
Dec 12, 2020

Conversation

drexler
Copy link
Contributor

@drexler drexler commented Dec 12, 2020

Fixes #355

@drexler drexler requested a review from a team December 12, 2020 00:51
@codecov
Copy link

codecov bot commented Dec 12, 2020

Codecov Report

Merging #382 (3a3b52d) into master (8353ee2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #382   +/-   ##
=======================================
  Coverage   49.34%   49.34%           
=======================================
  Files          66       66           
  Lines        5326     5326           
=======================================
  Hits         2628     2628           
  Misses       2698     2698           

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 8353ee2...3a3b52d. Read the comment docs.

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.

Would be nice to indicate the UNSET should never be used here.

fn from_statuscode_to_str(status_code: StatusCode) -> &'static str {
match status_code {
StatusCode::Ok => "OK",
StatusCode::Unset => "UNSET",
StatusCode::Error => "ERROR",
}
}

@drexler
Copy link
Contributor Author

drexler commented Dec 12, 2020

Would be nice to indicate the UNSET should never be used here.

fn from_statuscode_to_str(status_code: StatusCode) -> &'static str {
match status_code {
StatusCode::Ok => "OK",
StatusCode::Unset => "UNSET",
StatusCode::Error => "ERROR",
}
}

I had intentionally left that with the thinking that the function might be useful in future if there was a need for a stringified version of the StatusCode elsewhere. Anyway, this update should be more flexible. Thanks for the review.

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.

LGTM. Thanks!

@jtescher jtescher merged commit f780d91 into open-telemetry:master Dec 12, 2020
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.

Zipkin: Do not send status unless ok or error
3 participants