You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,11 @@
2
2
3
3
## Unreleased
4
4
5
+
* Autoconfigure now supports an option to disable the SDK.
6
+
If `otel.sdk.disabled=true`, `AutoConfiguredOpenTelemetrySdk#getOpenTelemetrySdk()`
7
+
returns a minimal (but not noop) `OpenTelemetrySdk` with noop tracing, metric and logging providers. The same minimal instance is set
8
+
to `GlobalOpenTelemetry`. The now deprecated property `otel.experimental.sdk.enabled` will continue to work in the same way during a transition period.
Copy file name to clipboardExpand all lines: sdk-extensions/autoconfigure/README.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -39,9 +39,9 @@ for more details.
39
39
40
40
The OpenTelemetry SDK can be disabled entirely. If disabled, `AutoConfiguredOpenTelemetrySdk#getOpenTelemetrySdk()` will return a minimally configured instance (i.e. `OpenTelemetrySdk.builder().build()`).
41
41
42
-
| System property | Environment variable| Purpose|
| otel.sdk.disabled|OTEL_SDK_DISABLED | If `true`, disable the OpenTelemetry SDK. Defaults to `false`. The now legacy property `otel.experimental.sdk.enabled` will continue to work with default `true` during a transition period. |
Copy file name to clipboardExpand all lines: sdk-extensions/autoconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/AutoConfiguredOpenTelemetrySdkBuilder.java
+3-2
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,6 @@
33
33
importjava.util.HashMap;
34
34
importjava.util.List;
35
35
importjava.util.Map;
36
-
importjava.util.Optional;
37
36
importjava.util.ServiceLoader;
38
37
importjava.util.concurrent.TimeUnit;
39
38
importjava.util.function.BiFunction;
@@ -333,7 +332,9 @@ public AutoConfiguredOpenTelemetrySdk build() {
Copy file name to clipboardExpand all lines: sdk-extensions/autoconfigure/src/test/java/io/opentelemetry/sdk/autoconfigure/AutoConfiguredOpenTelemetrySdkTest.java
+101-29
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,52 @@ class AutoConfiguredOpenTelemetrySdkTest {
0 commit comments