mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-09-25 11:32:07 +00:00
open telemetry: Use Span.current().isRecording() rather than isValid()
Change to use isRecording() to determine if ProfileStream should be created for collecting profiling events
This commit is contained in:
@@ -63,7 +63,7 @@ public final class OtelProfileHandler implements SpiProfileHandler, Plugin {
|
||||
*/
|
||||
@Override
|
||||
public @Nullable ProfileStream createProfileStream(@Nullable ProfileLocation location, @Nullable String label) {
|
||||
if (!Span.current().getSpanContext().isValid()) {
|
||||
if (!Span.current().isRecording()) {
|
||||
// No active OTel trace context — don't create spans to avoid noise
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user