增加环绕侦察场景适配
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -63,7 +63,7 @@ class SpanExporter:
|
||||
|
||||
def export(
|
||||
self, spans: typing.Sequence[ReadableSpan]
|
||||
) -> "SpanExportResult":
|
||||
) -> "SpanExportResult": # pyright: ignore[reportReturnType]
|
||||
"""Exports a batch of telemetry data.
|
||||
|
||||
Args:
|
||||
@@ -79,7 +79,7 @@ class SpanExporter:
|
||||
Called when the SDK is shut down.
|
||||
"""
|
||||
|
||||
def force_flush(self, timeout_millis: int = 30000) -> bool:
|
||||
def force_flush(self, timeout_millis: int = 30000) -> bool: # pyright: ignore[reportReturnType]
|
||||
"""Hint to ensure that the export of any spans the exporter has received
|
||||
prior to the call to ForceFlush SHOULD be completed as soon as possible, preferably
|
||||
before returning from this method.
|
||||
@@ -102,7 +102,7 @@ class SimpleSpanProcessor(SpanProcessor):
|
||||
pass
|
||||
|
||||
def on_end(self, span: ReadableSpan) -> None:
|
||||
if not span.context.trace_flags.sampled:
|
||||
if not (span.context and span.context.trace_flags.sampled):
|
||||
return
|
||||
token = attach(set_value(_SUPPRESS_INSTRUMENTATION_KEY, True))
|
||||
try:
|
||||
@@ -188,7 +188,7 @@ class BatchSpanProcessor(SpanProcessor):
|
||||
pass
|
||||
|
||||
def on_end(self, span: ReadableSpan) -> None:
|
||||
if not span.context.trace_flags.sampled:
|
||||
if not (span.context and span.context.trace_flags.sampled):
|
||||
return
|
||||
self._batch_processor.emit(span)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user