Skip to content

Commit d146e46

Browse files
committed
fix test tracing typo
1 parent 1250d19 commit d146e46

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tests/test_tracing.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414

1515

1616
import pytest
17+
from opentelemetry import trace as trace_api
18+
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import (
19+
OTLPSpanExporter,
20+
)
21+
from opentelemetry.sdk import trace as trace_sdk
22+
from opentelemetry.sdk.trace.export import BatchSpanProcessor
1723

1824
from veadk.tracing.telemetry.exporters.apmplus_exporter import (
1925
APMPlusExporter,
@@ -29,17 +35,11 @@
2935
)
3036
from veadk.tracing.telemetry.opentelemetry_tracer import OpentelemetryTracer
3137

32-
from opentelemetry import trace as trace_api
33-
from opentelemetry.sdk import trace as trace_sdk
34-
from opentelemetry.sdk.trace.export import BatchSpanProcessor
35-
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import (
36-
OTLPSpanExporter,
37-
)
38-
3938
APP_NAME = "app"
4039
USER_ID = "testuser"
4140
SESSION_ID = "testsession"
4241

42+
4343
def init_exporters():
4444
cozeloop_exporter = CozeloopExporter(
4545
config=CozeloopExporterConfig(
@@ -68,13 +68,15 @@ def init_exporters():
6868
)
6969
return [cozeloop_exporter, apmplus_exporter, tls_exporter]
7070

71+
7172
def gen_span_processor(endpoint: str):
7273
otlp_exporter = OTLPSpanExporter(
7374
endpoint=endpoint,
7475
)
7576
span_processor = BatchSpanProcessor(otlp_exporter)
7677
return span_processor
7778

79+
7880
@pytest.mark.asyncio
7981
async def test_tracing():
8082
exporters = init_exporters()
@@ -86,6 +88,7 @@ async def test_tracing():
8688
# TODO: Ensure the tracing provider is set correctly after loading SDK
8789
# TODO: Ensure the tracing provider is set correctly after loading SDK
8890

91+
8992
@pytest.mark.asyncio
9093
async def test_tracing_with_global_provider():
9194
exporters = init_exporters()
@@ -113,5 +116,3 @@ async def test_tracing_with_apmplus_global_provider():
113116

114117
# apmplus exporter won't init again
115118
assert len(tracer.exporters) == 4 # with extra 2 built-in exporters
116-
117-

0 commit comments

Comments
 (0)