better naming

This commit is contained in:
Adil Hafeez 2024-11-07 15:05:20 -08:00
parent 460d978f8a
commit 6632428909
2 changed files with 7 additions and 3 deletions

View file

@ -78,7 +78,7 @@ static_resources:
envoy_grpc:
cluster_name: opentelemetry_collector
timeout: 0.250s
service_name: arch_internal
service_name: prompt_processor
random_sampling:
value: {{ arch_tracing.random_sampling }}
{% endif %}
@ -191,7 +191,7 @@ static_resources:
envoy_grpc:
cluster_name: opentelemetry_collector
timeout: 0.250s
service_name: arch_internal
service_name: prompt_processor
random_sampling:
value: {{ arch_tracing.random_sampling }}
{% endif %}

View file

@ -42,10 +42,14 @@ app = FastAPI()
FastAPIInstrumentor().instrument_app(app)
# DEFAULT_OTLP_HOST = "http://localhost:4317"
DEFAULT_OTLP_HOST = "none"
# Configure the OTLP exporter (Jaeger, Zipkin, etc.)
otlp_exporter = OTLPSpanExporter(
endpoint=os.getenv("OLTP_HOST", "http://localhost:4317") # noqa: F821
endpoint=os.getenv("OTLP_HOST", DEFAULT_OTLP_HOST) # noqa: F821
)
trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(otlp_exporter))