dd-trace-js icon indicating copy to clipboard operation
dd-trace-js copied to clipboard

support telemetry via uds

Open bengl opened this issue 3 years ago • 2 comments
trafficstars

What does this PR do?

Corrects the code that was only passing hostname and port through to request for telemetry, so that it can pass URLs instead.

Motivation

Prior to this, telemetry was not working when UDS URLs were used.

bengl avatar Sep 22 '22 17:09 bengl

Overall package size

Self size: 2.76 MB Deduped: 30.04 MB No deduping: 30.25 MB

Dependency sizes

name version self size total size
@datadog/pprof 1.0.2 8.74 MB 14.46 MB
@datadog/native-metrics 1.4.3 6.57 MB 6.58 MB
@datadog/native-appsec 1.2.1 5.1 MB 5.43 MB
opentracing 0.14.7 194.81 kB 194.81 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
semver 5.7.1 61.58 kB 61.58 kB
ipaddr.js 2.0.1 59.52 kB 59.52 kB
ignore 5.2.0 48.87 kB 48.87 kB
import-in-the-middle 1.3.4 32.7 kB 37.17 kB
istanbul-lib-coverage 3.2.0 29.34 kB 29.34 kB
retry 0.10.1 27.44 kB 27.44 kB
lodash.uniq 4.5.0 25.01 kB 25.01 kB
limiter 1.1.5 23.17 kB 23.17 kB
lodash.kebabcase 4.1.1 17.75 kB 17.75 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

github-actions[bot] avatar Sep 22 '22 17:09 github-actions[bot]

Codecov Report

Merging #2404 (840829f) into master (b819d04) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2404   +/-   ##
=======================================
  Coverage   92.98%   92.98%           
=======================================
  Files         279      279           
  Lines        9498     9498           
=======================================
  Hits         8832     8832           
  Misses        666      666           
Impacted Files Coverage Δ
packages/dd-trace/src/telemetry/send-data.js 100.00% <ø> (ø)

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

codecov[bot] avatar Sep 22 '22 17:09 codecov[bot]

@bengl any problems regarding this? Can we move forward?

rtfpessoa avatar Oct 10 '22 10:10 rtfpessoa

Benchmarks for Node.js v16

Parameters

Baseline Candidate
config baseline candidate
git_branch master bengl/support-telemetry-via-uds
git_commit_sha b819d043 840829f0
See matching parameters
Baseline Candidate
name profiler profiler
nodeVersion 16.17.1 16.17.1
variant control control

Summary

Found 4 performance improvements and 5 performance regressions! Performance is the same for 341 cases.

scenario Δ mean cpu_system_time Δ mean cpu_usage_percentage Δ mean cpu_user_time Δ mean execution_time Δ mean max_event_loop_delay Δ mean max_gc_pause Δ mean max_rss_usage
scenario:plugin-http-client-control-16 worse
[+5.252ms; +23.041ms] or [+4.093%; +17.957%]
same better
[-23.698ms; -5.957ms] or [-6.025%; -1.514%]
same same
scenario:exporting-pipeline-0.4-16 same same worse
[+24.836ms; +60.274ms] or [+2.601%; +6.311%]
worse
[+0.021s; +0.054s] or [+2.061%; +5.200%]
unsure
[-5.951KB; -1.337KB] or [-6.318%; -1.420%]
scenario:appsec-control-16 better
[-20.766ms; -2.126ms] or [-17.045%; -1.745%]
same unsure
[+2.554ms; +21.338ms] or [+0.316%; +2.644%]
same same
scenario:log-without-log-16 better
[-3.847ms; -0.732ms] or [-19.458%; -3.702%]
same unsure
[+0.895ms; +4.025ms] or [+0.785%; +3.530%]
same unsure
[-0.095KB; -0.022KB] or [-0.210%; -0.049%]
scenario:startup-control-everything-16 same same worse
[+0.031s; +0.059s] or [+2.976%; +5.660%]
worse
[+0.034s; +0.055s] or [+2.832%; +4.553%]
unsure
[+0.872KB; +1.533KB] or [+0.719%; +1.264%]
scenario:plugin-graphql-with-depth-on-max-16 better
[-202.682ms; -33.302ms] or [-30.892%; -5.076%]
same same same same

pr-commenter[bot] avatar Oct 26 '22 17:10 pr-commenter[bot]

Benchmarks for Node.js v18

Parameters

Baseline Candidate
config baseline candidate
git_branch master bengl/support-telemetry-via-uds
git_commit_sha b819d043 840829f0
See matching parameters
Baseline Candidate
name profiler profiler
nodeVersion 18.10.0 18.10.0
variant control control

Summary

Found 1 performance improvements and 2 performance regressions! Performance is the same for 347 cases.

scenario Δ mean cpu_system_time Δ mean cpu_usage_percentage Δ mean cpu_user_time Δ mean execution_time Δ mean max_event_loop_delay Δ mean max_gc_pause Δ mean max_rss_usage
scenario:log-skip-log-18 better
[-3.884ms; -0.829ms] or [-17.603%; -3.755%]
same unsure
[+1.010ms; +4.062ms] or [+0.848%; +3.410%]
unsure
[+0.079ms; +0.322ms] or [+0.056%; +0.227%]
unsure
[+0.008KB; +0.035KB] or [+0.016%; +0.070%]
scenario:startup-control-everything-18 same same same unsure
[+0.003s; +0.013s] or [+0.259%; +1.005%]
worse
[+2.082KB; +4.192KB] or [+1.592%; +3.206%]
scenario:encoders-0.5-18 worse
[+3.427ms; +20.544ms] or [+3.313%; +19.861%]
same unsure
[-0.023s; -0.001s] or [-1.043%; -0.051%]
same unsure
[+0.130KB; +0.215KB] or [+0.098%; +0.163%]

pr-commenter[bot] avatar Oct 26 '22 17:10 pr-commenter[bot]

Benchmarks for Node.js v14

Parameters

Baseline Candidate
config baseline candidate
git_branch master bengl/support-telemetry-via-uds
git_commit_sha b819d043 840829f0
See matching parameters
Baseline Candidate
name profiler profiler
nodeVersion 14.20.1 14.20.1
variant control control

Summary

Found 3 performance improvements and 0 performance regressions! Performance is the same for 347 cases.

scenario Δ mean cpu_system_time Δ mean cpu_usage_percentage Δ mean cpu_user_time Δ mean execution_time Δ mean max_event_loop_delay Δ mean max_gc_pause Δ mean max_rss_usage
scenario:exporting-pipeline-0.4_with_stats-14 better
[-16.165ms; -1.566ms] or [-22.516%; -2.181%]
same unsure
[+0.003s; +0.021s] or [+0.216%; +1.565%]
same same
scenario:net-with-tracer-14 same same same same better
[-2.103KB; -1.470KB] or [-3.781%; -2.642%]
scenario:appsec-appsec-enabled-with-attacks-14 better
[-29.724ms; -3.368ms] or [-19.342%; -2.192%]
same unsure
[+0.005s; +0.031s] or [+0.433%; +2.579%]
same same

pr-commenter[bot] avatar Oct 26 '22 17:10 pr-commenter[bot]

I tried running the system tests on master, and it looks like Telemetry already works. I believe this is what you were trying to achieve @rtfpessoa ?

simon-id avatar Oct 27 '22 11:10 simon-id

I tried running the system tests on master, and it looks like Telemetry already works. I believe this is what you were trying to achieve @rtfpessoa ?

Yes, I have this PR ready to be merged when it passes https://github.com/DataDog/system-tests/pull/503

rtfpessoa avatar Oct 27 '22 12:10 rtfpessoa

Ok thanks @rtfpessoa I was about to submit the same PR. I tested the present PR and master with the UDS and non-UDS scenario of system tests, and it becomes obvious this PR actually fixes UDS just to confirm a doubt I think you had @bengl .

simon-id avatar Oct 27 '22 13:10 simon-id