Skip to content

Conversation

@Qard
Copy link
Contributor

@Qard Qard commented Nov 4, 2022

What does this PR do?

Adds OpenTelemetry support to the tracer.

Motivation

We want a smooth way for users to integrate OpenTelemetry systems with dd-trace.

@codecov
Copy link

codecov bot commented Nov 4, 2022

Codecov Report

Merging #2498 (02b475c) into master (f0c974a) will increase coverage by 0.17%.
The diff coverage is 91.09%.

@@            Coverage Diff             @@
##           master    #2498      +/-   ##
==========================================
+ Coverage   85.72%   85.89%   +0.17%     
==========================================
  Files         182      189       +7     
  Lines        7229     7416     +187     
  Branches       33       33              
==========================================
+ Hits         6197     6370     +173     
- Misses       1032     1046      +14     
Impacted Files Coverage Δ
packages/dd-trace/src/proxy.js 97.72% <0.00%> (-2.28%) ⬇️
...ages/dd-trace/src/opentelemetry/context_manager.js 84.61% <84.61%> (ø)
packages/dd-trace/src/opentelemetry/tracer.js 85.71% <85.71%> (ø)
packages/dd-trace/src/opentelemetry/span.js 92.15% <92.15%> (ø)
...kages/dd-trace/src/opentelemetry/span_processor.js 92.30% <92.30%> (ø)
...ages/dd-trace/src/opentelemetry/tracer_provider.js 96.66% <96.66%> (ø)
packages/dd-trace/src/opentelemetry/sampler.js 100.00% <100.00%> (ø)
...ackages/dd-trace/src/opentelemetry/span_context.js 100.00% <100.00%> (ø)
packages/dd-trace/src/opentracing/span.js 76.76% <100.00%> (+1.49%) ⬆️

... and 2 files with indirect coverage changes

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

@pr-commenter
Copy link

pr-commenter bot commented Nov 4, 2022

Benchmarks

Comparing candidate commit 02b475c in PR branch otel-prototype with baseline commit f0c974a in branch master.

Found 1 performance improvements and 0 performance regressions! Performance is the same for 443 metrics, 28 unstable metrics.

scenario:startup-control-everything-18

  • 🟩 max_rss_usage [-7.545KB; -7.195KB] or [-5.257%; -5.012%]

@github-actions
Copy link

github-actions bot commented Apr 18, 2023

Overall package size

Self size: 4.3 MB
Deduped: 60.71 MB
No deduping: 60.76 MB

Dependency sizes

name version self size total size
@datadog/pprof 2.2.1 14.24 MB 15.12 MB
@datadog/native-iast-taint-tracking 1.4.1 14.85 MB 14.86 MB
@datadog/native-appsec 3.2.0 13.38 MB 13.39 MB
protobufjs 7.1.2 2.76 MB 6.55 MB
@datadog/native-iast-rewriter 2.0.1 2.09 MB 2.1 MB
@opentelemetry/core 1.10.1 843.35 kB 1.44 MB
@datadog/native-metrics 2.0.0 898.77 kB 1.3 MB
@opentelemetry/api 1.4.1 780.32 kB 780.32 kB
opentracing 0.14.7 194.81 kB 194.81 kB
semver 7.3.8 88.2 kB 118.6 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.0.1 59.52 kB 59.52 kB
ignore 5.2.0 48.87 kB 48.87 kB
import-in-the-middle 1.3.5 34.34 kB 38.81 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
node-abort-controller 3.0.1 14.33 kB 14.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

@Qard Qard force-pushed the otel-prototype branch 9 times, most recently from c919a37 to 2f77127 Compare April 20, 2023 00:30
@Qard Qard force-pushed the otel-prototype branch 9 times, most recently from 86e3920 to 61340eb Compare June 5, 2023 03:23
@Qard Qard force-pushed the otel-prototype branch from 61340eb to 0780d12 Compare June 5, 2023 03:39
@Qard Qard changed the title WIP OTel Prototype OTel SDK Jun 5, 2023
@Qard
Copy link
Contributor Author

Qard commented Jun 5, 2023

This is all working now and passing all the system tests here: DataDog/system-tests#1237

As far as I can tell the only remaining thing missing is telemetry, but that should be straightforward.

@Qard Qard marked this pull request as ready for review June 5, 2023 03:41
@Qard Qard force-pushed the otel-prototype branch 5 times, most recently from 55c6b32 to f039861 Compare June 8, 2023 05:22
@Qard Qard force-pushed the otel-prototype branch from f039861 to 85f5194 Compare June 8, 2023 05:22
bengl
bengl previously approved these changes Jun 8, 2023
interface winston extends Integration {}
}

export namespace opentelemetry {
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's probably a way we could just link to OTel's API docs instead of including it directly here, but this should suffice for now.

Copy link
Contributor Author

@Qard Qard Jun 8, 2023

Choose a reason for hiding this comment

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

typedoc would do that automatically, but I believe we turned that capability off to prevent OpenTracing from showing docs for features we didn't support. Which I suppose if we wanted to continue in that direction some of the docs for opentelemetry should be removed too as there are some interfaces we have to not break compatibility but are just no-ops currently.

rochdev
rochdev previously approved these changes Jun 8, 2023
@Qard Qard dismissed stale reviews from rochdev and bengl via 02b475c June 8, 2023 17:35
@Qard Qard merged commit 6f9085e into master Jun 8, 2023
@Qard Qard deleted the otel-prototype branch June 8, 2023 22:23
Qard pushed a commit that referenced this pull request Jun 9, 2023
Qard pushed a commit that referenced this pull request Jun 9, 2023
Qard pushed a commit that referenced this pull request Jun 9, 2023
This was referenced Jun 9, 2023
Qard pushed a commit that referenced this pull request Jun 9, 2023
Qard pushed a commit that referenced this pull request Jun 12, 2023
Qard pushed a commit that referenced this pull request Jun 12, 2023
Qard pushed a commit that referenced this pull request Jun 13, 2023
Qard pushed a commit that referenced this pull request Jun 13, 2023
Qard pushed a commit that referenced this pull request Jun 13, 2023
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.

5 participants