Skip to content

Commit

Permalink
Merge pull request #13 from swisscom/bugfix/disable-test-for-noop-spa…
Browse files Browse the repository at this point in the history
…n-implementation-as-a-temp-fix

Disable check for noop span implementation.
  • Loading branch information
rsteppac authored Oct 21, 2024
2 parents ac90b25 + 70ce25e commit f310fba
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ object TraceSupport {

val span: Span = tracer.spanBuilder().name(spanName).start()

require(span.toString().startsWith("PropagatedSpan")) {
"Expected an OpenTelemetry `PropagatedSpan` (which is a noop implementation) but got a ${span.javaClass.canonicalName} instead."
}
// TODO: Comment out for the time being. It appears the Azure Application Insights agent enables telemetry collection,
// which causes below test to fail. We need to investigate whether the unclosed span (we close the "Span in Scope" but
// not the span itself) causes a resource leak and if so, find another solution. See #37831.
// require(span.toString().startsWith("PropagatedSpan")) {
// "Expected an OpenTelemetry `PropagatedSpan` (which is a noop implementation) but got a ${span.javaClass.canonicalName} instead."
// }

val spanInScope: SpanInScope = tracer.withSpan(span)

Expand Down

0 comments on commit f310fba

Please sign in to comment.