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

add remote config support for custom tags #3875

Merged
merged 2 commits into from
Dec 21, 2023
Merged

add remote config support for custom tags #3875

merged 2 commits into from
Dec 21, 2023

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Dec 13, 2023

What does this PR do?

Add remote config support for custom tags.

Motivation

So that users can set custom tags through the UI.

Additional Notes

The previous behaviour of merging tags was incorrect and has now been fixed with the tests updated accordingly.

@rochdev rochdev requested review from a team as code owners December 13, 2023 23:17
Copy link

github-actions bot commented Dec 13, 2023

Overall package size

Self size: 5.78 MB
Deduped: 61.89 MB
No deduping: 62.65 MB

Dependency sizes

name version self size total size
@datadog/native-iast-taint-tracking 1.6.4 16.43 MB 16.44 MB
@datadog/native-appsec 5.0.0 15.16 MB 15.17 MB
@datadog/pprof 4.1.0 9.36 MB 10.21 MB
protobufjs 7.2.5 2.77 MB 6.56 MB
@datadog/native-iast-rewriter 2.2.2 2.29 MB 2.37 MB
@opentelemetry/core 1.14.0 872.87 kB 1.47 MB
@datadog/native-metrics 2.0.0 898.77 kB 1.3 MB
@opentelemetry/api 1.4.1 780.32 kB 780.32 kB
import-in-the-middle 1.4.2 41.4 kB 704.79 kB
pprof-format 2.0.7 588.12 kB 588.12 kB
msgpack-lite 0.1.26 201.16 kB 281.59 kB
opentracing 0.14.7 194.81 kB 194.81 kB
semver 7.5.4 93.4 kB 123.8 kB
@datadog/sketches-js 2.1.0 109.9 kB 109.9 kB
lodash.sortby 4.7.0 75.76 kB 75.76 kB
lru-cache 7.14.0 74.95 kB 74.95 kB
ipaddr.js 2.1.0 60.23 kB 60.23 kB
ignore 5.2.4 51.22 kB 51.22 kB
int64-buffer 0.1.10 49.18 kB 49.18 kB
istanbul-lib-coverage 3.2.0 29.34 kB 29.34 kB
lodash.uniq 4.5.0 25.01 kB 25.01 kB
tlhunter-sorted-set 0.1.0 24.94 kB 24.94 kB
limiter 1.1.5 23.17 kB 23.17 kB
dc-polyfill 0.1.2 22.77 kB 22.77 kB
retry 0.13.1 18.85 kB 18.85 kB
lodash.kebabcase 4.1.1 17.75 kB 17.75 kB
node-abort-controller 3.1.1 16.89 kB 16.89 kB
lodash.pick 4.4.0 16.33 kB 16.33 kB
jest-docblock 29.7.0 8.99 kB 12.76 kB
crypto-randomuuid 1.0.0 11.18 kB 11.18 kB
path-to-regexp 0.1.7 6.78 kB 6.78 kB
koalas 1.0.2 6.47 kB 6.47 kB
methods 1.1.2 5.29 kB 5.29 kB
module-details-from-path 1.0.3 4.47 kB 4.47 kB

🤖 This report was automatically generated by heaviest-objects-in-the-universe

Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (db16b8d) 84.73% compared to head (d6f8681) 84.66%.
Report is 2 commits behind head on master.

Files Patch % Lines
packages/dd-trace/src/telemetry/index.js 0.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3875      +/-   ##
==========================================
- Coverage   84.73%   84.66%   -0.07%     
==========================================
  Files         237      237              
  Lines        9937     9967      +30     
  Branches       33       33              
==========================================
+ Hits         8420     8439      +19     
- Misses       1517     1528      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pr-commenter
Copy link

pr-commenter bot commented Dec 13, 2023

Benchmarks

Benchmark execution time: 2023-12-20 18:39:14

Comparing candidate commit d6f8681 in PR branch rc-custom-tags with baseline commit db16b8d in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 519 metrics, 13 unstable metrics.

@rochdev rochdev marked this pull request as draft December 14, 2023 00:23
@rochdev rochdev marked this pull request as ready for review December 14, 2023 01:16
Qard
Qard previously approved these changes Dec 14, 2023
logInjection: 'DD_LOG_INJECTION',
headerTags: 'DD_TRACE_HEADER_TAGS',
tags: 'DD_TAGS'
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The config value names will be normalized when sent to the backend.
sampleRate and DD_TRACE_SAMPLE_RATE map to the same thing, logInjection is accepted but DD_LOG_INJECTION won't be recognized. We need to create a PR to config_norm_rules so that headerTags will be accepted. DD_TAGS will be accepted but tags won't be recognized. Since we will be sending the other config values to the backend with camel case names, I'm suggesting we do that here too, and create a PR to the json file to add the missing mappings.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure I understand. Are you saying that the value that is literally used by the backend to send the information to us will not be recognized by the same backend when reported as telemetry? If that's the case it sounds like a bug in the backend that should be fixed, and thus I don't think it's on us to change anything in another PR. The safe approach is to send the same names we received.

Copy link
Member Author

Choose a reason for hiding this comment

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

I asked about this and was told this is all still in flight and not required to be correct for now. System tests will be added when we know exactly the values that need to be sent.

@rochdev rochdev force-pushed the rc-custom-tags branch 2 times, most recently from 5c68135 to 1bf591a Compare December 19, 2023 15:31
hoolioh
hoolioh previously approved these changes Dec 20, 2023
@rochdev rochdev dismissed stale reviews from hoolioh and Qard via d6f8681 December 20, 2023 18:30
@rochdev rochdev merged commit bcb71e1 into master Dec 21, 2023
108 of 109 checks passed
@rochdev rochdev deleted the rc-custom-tags branch December 21, 2023 19:58
@khanayan123 khanayan123 mentioned this pull request Jan 2, 2024
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.

4 participants