feat - use traceparent to proporgate OTEL traces

This commit is contained in:
Ishaan Jaff 2024-06-11 13:57:31 -07:00
parent c9bb4b29c7
commit 7ce1289548
2 changed files with 20 additions and 0 deletions

View file

@ -533,6 +533,9 @@ async def user_api_key_auth(
parent_otel_span = open_telemetry_logger.tracer.start_span(
name="Received Proxy Server Request",
start_time=_to_ns(datetime.now()),
context=open_telemetry_logger.get_traceparent_from_header(
headers=request.headers
),
)
### USER-DEFINED AUTH FUNCTION ###
if user_custom_auth is not None: