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

Ensure special tags are always strings #1556

Merged
merged 2 commits into from
Jun 14, 2021
Merged

Ensure special tags are always strings #1556

merged 2 commits into from
Jun 14, 2021

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Jun 10, 2021

Some Span tags have special handling in the Datadog Agent. Here's the list of these tags.
These tags have to always be reported as string Tags, not numerical Metrics.

One example of issues caused by setting these values as numerical is this:

span.set_tag('version', 123)

In this case, version will not correctly set the span version, thus not correctly updating the Datadog backend version value.

This PR adds a check and ensures that these values are always string tags.

@marcotc marcotc self-assigned this Jun 10, 2021
@marcotc marcotc requested a review from a team June 10, 2021 22:10
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2021

Codecov Report

Merging #1556 (4a1818d) into master (50e2f8e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1556   +/-   ##
=======================================
  Coverage   98.23%   98.23%           
=======================================
  Files         878      878           
  Lines       42390    42407   +17     
=======================================
+ Hits        41643    41660   +17     
  Misses        747      747           
Impacted Files Coverage Δ
lib/ddtrace/configuration/components.rb 98.19% <100.00%> (ø)
lib/ddtrace/span.rb 97.00% <100.00%> (+0.07%) ⬆️
spec/ddtrace/span_spec.rb 100.00% <100.00%> (ø)

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 638a836...4a1818d. Read the comment docs.

ericmustin
ericmustin previously approved these changes Jun 10, 2021
lib/ddtrace/span.rb Outdated Show resolved Hide resolved
@marcotc marcotc merged commit 1365faf into master Jun 14, 2021
@marcotc marcotc deleted the ensure-tags branch June 14, 2021 17:50
@github-actions github-actions bot added this to the 0.51.0 milestone Jun 14, 2021
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.

4 participants