Skip to content

Commit 2739449

Browse files
authored
remove explicit filter to simplify span stacktrace declarative config (#1117)
* span stacktrace filtering simplification with DC * simplify remove span stacktrace filtering * manually add changelog entry
1 parent 2a32948 commit 2739449

6 files changed

Lines changed: 22 additions & 96 deletions

File tree

custom/src/main/java/co/elastic/otel/ElasticAutoConfigurationCustomizerProvider.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ private static void spanStackTrace(
173173
}
174174
config.put(STACKTRACE_OTEL_DURATION, value);
175175
}
176-
177-
config.put(STACKTRACE_OTEL_FILTER, SpanStackTraceFilter.class.getName());
178176
}
179177

180178
private static void indyInstrumentation(

custom/src/main/java/co/elastic/otel/SpanStackTraceFilter.java

Lines changed: 0 additions & 35 deletions
This file was deleted.

custom/src/main/resources/co/elastic/otel/config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ tracer_provider:
4040
# Requires the span-stacktrace extension (included in EDOT)
4141
# https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/span-stacktrace
4242
- stacktrace/development:
43-
# TODO: remove filtering once https://github.com/open-telemetry/opentelemetry-java-contrib/pull/2803 is merged and released
44-
filter: co.elastic.otel.SpanStackTraceFilter
4543

4644
# Requires the inferred-spans extension (included in EDOT)
4745
# https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/inferred-spans

custom/src/test/java/co/elastic/otel/SpanStackTraceFilterTest.java

Lines changed: 0 additions & 57 deletions
This file was deleted.

custom/src/test/java/co/elastic/otel/declarativeconfig/DefaultDeclarativeConfigTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,19 @@ void testDefaults() {
8787
.inPath("baggage")
8888
.isObject();
8989

90+
// stacktrace processor does not have any configuration by default, thus we have to test
91+
// for additional
92+
// property presence without using json serialization.
93+
assertThat(
94+
config
95+
.getTracerProvider()
96+
.getProcessors()
97+
.get(1)
98+
.getAdditionalProperties()
99+
.containsKey("stacktrace/development"))
100+
.describedAs("stacktrace processor should be present by default")
101+
.isTrue();
102+
90103
assertThatJson(json(config.getTracerProvider().getProcessors().get(2)))
91104
.inPath("inferred_spans/development")
92105
.isObject()

docs/changelog/1117.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
prs:
2+
- https://github.com/elastic/elastic-otel-java/pull/1117
3+
issues:
4+
- https://github.com/elastic/elastic-otel-java/issues/1083
5+
type: enhancement
6+
products:
7+
- product: edot-java
8+
lifecycle: ga
9+
title: remove explicit filter to simplify span stacktrace declarative config

0 commit comments

Comments
 (0)