Skip to content

format peerServiceMapping of config object before emitting telemetry configuration payload#3566

Merged
wconti27 merged 11 commits into
masterfrom
conti/add-missing-telemetry-configurations
Sep 12, 2023
Merged

format peerServiceMapping of config object before emitting telemetry configuration payload#3566
wconti27 merged 11 commits into
masterfrom
conti/add-missing-telemetry-configurations

Conversation

@wconti27

@wconti27 wconti27 commented Aug 22, 2023

Copy link
Copy Markdown
Contributor

What this PR does:

This PR adds a function that is used to format the tracer configuration object peerServiceMapping attribute from a map to a string map. This is necessary for telemetry intake to accept the configuration key and value.

Why this PR is needed:

The current way that NodeJS Telemetry flattens the tracer config object results in the current peerServiceMapping object being flattened as well, and therefore blocked at telemetry intake.

Additional Notes

@wconti27
wconti27 requested a review from a team as a code owner August 22, 2023 18:56
@wconti27 wconti27 self-assigned this Aug 22, 2023
@github-actions

github-actions Bot commented Aug 22, 2023

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 5.17 MB
Deduped: 59.21 MB
No deduping: 59.38 MB

Dependency sizes

name version self size total size
@datadog/native-iast-taint-tracking 1.5.0 14.86 MB 14.86 MB
@datadog/native-appsec 3.2.0 13.38 MB 13.39 MB
@datadog/pprof 3.2.0 10.8 MB 11.64 MB
protobufjs 7.2.4 2.74 MB 6.52 MB
@datadog/native-iast-rewriter 2.1.3 2.23 MB 2.32 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
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
limiter 1.1.5 23.17 kB 23.17 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
crypto-randomuuid 1.0.0 11.18 kB 11.18 kB
diagnostics_channel 1.1.0 7.07 kB 7.07 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

@codecov

codecov Bot commented Aug 22, 2023

Copy link
Copy Markdown

Codecov Report

Merging #3566 (b26f8db) into master (8cf126c) will decrease coverage by 16.38%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master    #3566       +/-   ##
===========================================
- Coverage   84.70%   68.32%   -16.38%     
===========================================
  Files         219      213        -6     
  Lines        8948     8476      -472     
  Branches       33       33               
===========================================
- Hits         7579     5791     -1788     
- Misses       1369     2685     +1316     
Files Changed Coverage Δ
packages/dd-trace/src/telemetry/index.js 90.00% <100.00%> (+0.38%) ⬆️

... and 66 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pr-commenter

pr-commenter Bot commented Aug 23, 2023

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2023-09-11 20:22:23

Comparing candidate commit b26f8db in PR branch conti/add-missing-telemetry-configurations with baseline commit 8cf126c in branch master.

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

@sabrenner
sabrenner force-pushed the conti/add-missing-telemetry-configurations branch from 85d15c5 to 73a0f3b Compare August 28, 2023 17:34
Comment thread packages/dd-trace/src/config.js Outdated
@wconti27 wconti27 changed the title add raw peer service mapping configuration to config object add unprocessed peer service mapping configuration to config object Aug 30, 2023
@wconti27 wconti27 changed the title add unprocessed peer service mapping configuration to config object format peerServiceMapping of config object before emitting telemetry configuration payload Sep 6, 2023

@rochdev rochdev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There should be a test for the new behaviour.

@wconti27
wconti27 requested a review from rochdev September 11, 2023 20:14
@wconti27
wconti27 merged commit fe2f44b into master Sep 12, 2023
khanayan123 pushed a commit that referenced this pull request Sep 26, 2023
…configuration payload (#3566)

* rework telemetry configuration event to format config object before and correctly emit peerServiceMapping for intake
@khanayan123 khanayan123 mentioned this pull request Sep 26, 2023
khanayan123 pushed a commit that referenced this pull request Sep 26, 2023
…configuration payload (#3566)

* rework telemetry configuration event to format config object before and correctly emit peerServiceMapping for intake
@khanayan123 khanayan123 mentioned this pull request Sep 26, 2023
khanayan123 pushed a commit that referenced this pull request Sep 27, 2023
…configuration payload (#3566)

* rework telemetry configuration event to format config object before and correctly emit peerServiceMapping for intake
khanayan123 pushed a commit that referenced this pull request Sep 27, 2023
…configuration payload (#3566)

* rework telemetry configuration event to format config object before and correctly emit peerServiceMapping for intake
@tlhunter
tlhunter deleted the conti/add-missing-telemetry-configurations branch January 19, 2024 22:18
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