Commit 694f25b
fix(electron): gate the Electron plugin behind an experimental flag (#9264)
* refactor(electron)!: gate the Electron plugin behind an experimental flag disabled in v7
The Electron integration (plugin + instrumentation) has moved to the
standalone Electron SDK (see DataDog/electron-sdk#152). dd-trace keeps
the plugin and instrumentation in place for backward compatibility, but
gates it behind the existing experimental opt-in mechanism so it is
disabled by default starting in v7, while remaining enabled by default
on earlier majors.
- ElectronPlugin.experimental is now DD_MAJOR >= 7, following the same
opt-in pattern already used by other experimental plugins (e.g. nats).
- major-overrides.js flips the documented DD_TRACE_ELECTRON_ENABLED
default to false for majorVersion >= 7, evaluated at runtime against
the branch's own DD_MAJOR so it stays accurate after backports.
- tracer.js now prefers the Electron exporter over OTLP when both
OTEL_TRACES_EXPORTER=otlp and experimental.exporter=electron are set,
so Electron SDK spans keep reaching the IPC bridge instead of being
silently routed to an OTLP endpoint.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix(electron): skip the implicit OTel sampler default for the Electron exporter
config/index.js forced OTel's parentbased_always_on sampler default
(sampleRate=1) whenever OTEL_TRACES_EXPORTER=otlp, without the same
Electron carve-out already present in opentracing/tracer.js's exporter
selection. Electron SDK users with OTEL_* vars set for an unrelated
telemetry pipeline could have dd-trace's sampling policy silently
overridden even though their trace exporter correctly stayed on the
Electron IPC bridge. An explicit OTEL_TRACES_SAMPLER still applies.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>1 parent d151db4 commit 694f25b
7 files changed
Lines changed: 50 additions & 4 deletions
File tree
- packages
- datadog-plugin-electron/src
- dd-trace
- src
- config
- opentracing
- test
- config
- opentelemetry
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
482 | 485 | | |
483 | | - | |
| 486 | + | |
| 487 | + | |
484 | 488 | | |
485 | 489 | | |
486 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
769 | 782 | | |
770 | 783 | | |
771 | 784 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
67 | 74 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
751 | 761 | | |
752 | 762 | | |
753 | 763 | | |
| |||
0 commit comments