Skip to content

Commit f11181d

Browse files
committed
Removed unexpected part in example
1 parent 5c0489c commit f11181d

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

examples/distro/custom/src/main/java/com/example/javaagent/DemoInstrumenterCustomizerProvider.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ public class DemoInstrumenterCustomizerProvider implements InstrumenterCustomize
4545
@Override
4646
public void customize(InstrumenterCustomizer customizer) {
4747
String instrumentationName = customizer.getInstrumentationName();
48-
SpanKind spanKind = customizer.getSpanKind();
49-
50-
// Customize HTTP server spans
51-
if (isHttpServerInstrumentation(instrumentationName) && spanKind == SpanKind.SERVER) {
48+
if (isHttpServerInstrumentation(instrumentationName)) {
5249
customizeHttpServer(customizer);
5350
}
5451
}

examples/extension/src/main/java/com/example/javaagent/DemoInstrumenterCustomizerProvider.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ public class DemoInstrumenterCustomizerProvider implements InstrumenterCustomize
4747
@Override
4848
public void customize(InstrumenterCustomizer customizer) {
4949
String instrumentationName = customizer.getInstrumentationName();
50-
SpanKind spanKind = customizer.getSpanKind();
51-
52-
// Apply customizations only to HTTP server spans
53-
if (isHttpServerInstrumentation(instrumentationName) && spanKind == SpanKind.SERVER) {
50+
if (isHttpServerInstrumentation(instrumentationName)) {
5451
customizeHttpServer(customizer);
5552
}
5653
}

0 commit comments

Comments
 (0)