Merge pull request #4133 from BerriAI/litellm_work_with_traceparents

[Feat] OTEL - allow propagating traceparent in headers
This commit is contained in:
Ishaan Jaff 2024-06-11 14:27:08 -07:00 committed by GitHub
commit 5eb2822d31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 128 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: