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

pkg/trace/agent: ensure normalizer reports bad service name #2942

Merged
merged 2 commits into from
Jan 23, 2019

Conversation

gbbr
Copy link
Contributor

@gbbr gbbr commented Jan 23, 2019

This change ensure that the normalizer reports a bad service name.
Previously it would always report the empty string on error.

This change ensure that the normalizer reports a bad service name.
Previously it would always report the empty string on error.
@gbbr gbbr added this to the 6.10.0 milestone Jan 23, 2019
@gbbr gbbr requested a review from a team as a code owner January 23, 2019 16:18
ufoot
ufoot previously approved these changes Jan 23, 2019
Copy link

@ufoot ufoot left a comment

Choose a reason for hiding this comment

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

Yup this is better, as a side note I think resource has a similar behavior:

https://github.com/DataDog/datadog-agent/pull/2942/files#diff-4140e394b1bfca821a710b030200a141R64

@gbbr
Copy link
Contributor Author

gbbr commented Jan 23, 2019

@ufoot you're right. I've made that change. Please re-approve.

@codecov-io
Copy link

Codecov Report

Merging #2942 into master will decrease coverage by 0.36%.
The diff coverage is 63.63%.

@@            Coverage Diff             @@
##           master    #2942      +/-   ##
==========================================
- Coverage   56.38%   56.02%   -0.37%     
==========================================
  Files         482      441      -41     
  Lines       34169    27280    -6889     
==========================================
- Hits        19267    15283    -3984     
+ Misses      13744    10965    -2779     
+ Partials     1158     1032     -126
Impacted Files Coverage Δ
pkg/trace/agent/normalizer.go 82.6% <63.63%> (-1.06%) ⬇️
pkg/collector/runner/runner.go 53.15% <0%> (-13.87%) ⬇️
pkg/trace/sampler/prioritysampler.go 49.05% <0%> (-11.99%) ⬇️
pkg/metadata/resources/resources.go 75% <0%> (-8.34%) ⬇️
pkg/trace/sampler/scoresampler.go 58.33% <0%> (-7.71%) ⬇️
pkg/quantile/key.go 46.15% <0%> (-7.18%) ⬇️
pkg/trace/api/listener.go 52% <0%> (-5.9%) ⬇️
pkg/util/kubernetes/clustername/clustername.go 57.89% <0%> (-5.75%) ⬇️
pkg/procmatch/signature.go 66.66% <0%> (-4.77%) ⬇️
pkg/metrics/event.go 67.1% <0%> (-4.64%) ⬇️
... and 327 more

Copy link

@ufoot ufoot left a comment

Choose a reason for hiding this comment

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

Thanks for making this more reliable.

@@ -94,7 +96,11 @@ func Normalize(s *pb.Span) error {
// ParentID set on the client side, no way of checking

// Type
s.Type = toUTF8(s.Type)
typ := toUTF8(s.Type)
Copy link

Choose a reason for hiding this comment

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

good catch !

@gbbr gbbr merged commit 9d7608c into master Jan 23, 2019
@gbbr gbbr deleted the gbbr/normalize-error branch January 23, 2019 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants