Skip to content

Commit

Permalink
use DefaultHttpServerInstrumenterBuilder to configure spring starter
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Jun 27, 2024
1 parent 25e510f commit 90b7170
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ otel:
common:
db-statement-sanitizer:
enabled: false
http:
client:
emit-experimental-telemetry: true
server:
emit-experimental-telemetry: true

spring:
r2dbc:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static void assertClientSpan(SpanDataAssert span, String path) {
.hasAttributesSatisfying(
OpenTelemetryAssertions.satisfies(UrlAttributes.URL_FULL, a -> a.endsWith(path)),
// this attribute is set by the experimental http instrumentation
OpenTelemetryAssertions.satisfies(BODY_SIZE, AbstractLongAssert::isPositive));
OpenTelemetryAssertions.satisfies(BODY_SIZE, AbstractLongAssert::isNotNegative));
}

@CanIgnoreReturnValue
Expand All @@ -37,7 +37,7 @@ public static SpanDataAssert assertServerSpan(SpanDataAssert span, String route)
.hasAttribute(HttpAttributes.HTTP_ROUTE, route)
.hasAttributesSatisfying(
// this attribute is set by the experimental http instrumentation
OpenTelemetryAssertions.satisfies(BODY_SIZE, AbstractLongAssert::isPositive));
OpenTelemetryAssertions.satisfies(BODY_SIZE, AbstractLongAssert::isNotNegative));
return span;
}
}

0 comments on commit 90b7170

Please sign in to comment.