File tree Expand file tree Collapse file tree
wavefront/server/apps/call_processing/call_processing/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6464)
6565from call_processing .constants .filler_phrases import FILLER_PHRASES
6666
67- # Step 1: Initialize OpenTelemetry with your chosen exporter
68- exporter = OTLPSpanExporter (
69- endpoint = os .getenv ('CALL_PROCESSING_OTLP_ENDPOINT' , 'http://localhost:4317' ),
70- insecure = True ,
71- )
72-
73- setup_tracing (
74- service_name = os .getenv ('CALL_PROCESSING_TRACING_SERVICE_NAME' , 'call-processing' ),
75- exporter = exporter ,
76- console_export = False , # Set to True for debug output
77- )
78-
7967ENABLE_TRACING = os .getenv ('CALL_PROCESSING_ENABLE_TRACING' , 'true' ).lower () == 'true'
8068ENABLE_TURN_TRACKING = (
8169 os .getenv ('CALL_PROCESSING_ENABLE_TURN_TRACKING' , 'true' ).lower () == 'true'
8270)
8371
72+ OTLP_ENDPOINT = os .getenv ('CALL_PROCESSING_OTLP_ENDPOINT' )
73+
74+ if ENABLE_TRACING and OTLP_ENDPOINT :
75+ exporter = OTLPSpanExporter (
76+ endpoint = OTLP_ENDPOINT ,
77+ insecure = True ,
78+ )
79+ setup_tracing (
80+ service_name = os .getenv (
81+ 'CALL_PROCESSING_TRACING_SERVICE_NAME' , 'call-processing'
82+ ),
83+ exporter = exporter ,
84+ console_export = False ,
85+ )
86+
8487
8588class STTLanguageSwitcher (ParallelPipeline ):
8689 """
You can’t perform that action at this time.
0 commit comments