llama-stack-mirror/llama_stack/apis
Dinesh Yeduguru 501e7c9d64
Fix opentelemetry adapter (#510)
# What does this PR do?

This PR fixes some of the issues with our telemetry setup to enable logs
to be delivered to opentelemetry and jaeger. Main fixes
1) Updates the open telemetry provider to use the latest oltp exports
instead of deprected ones.
2) Adds a tracing middleware, which injects traces into each HTTP
request that the server recieves and this is going to be the root trace.
Previously, we did this in the create_dynamic_route method, which is
actually not the actual exectuion flow, but more of a config and this
causes the traces to end prematurely. Through middleware, we plugin the
trace start and end at the right location.
3) We manage our own methods to create traces and spans and this does
not fit well with Opentelemetry SDK since it does not support provide a
way to take in traces and spans that are already created. it expects us
to use the SDK to create them. For now, I have a hacky approach of just
maintaining a map from our internal telemetry objects to the open
telemetry specfic ones. This is not the ideal solution. I will explore
other ways to get around this issue. for now, to have something that
works, i am going to keep this as is.

Addresses: #509
2024-11-22 18:18:11 -08:00
..
agents use logging instead of prints (#499) 2024-11-21 11:32:53 -08:00
batch_inference Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
common [Evals API][4/n] evals with generation meta-reference impl (#303) 2024-10-25 13:12:39 -07:00
datasetio Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
datasets change schema -> dataset_schema for register_dataset api (#443) 2024-11-13 11:17:46 -05:00
eval Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
eval_tasks Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
inference Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
inspect Remove "routing_table" and "routing_key" concepts for the user (#201) 2024-10-10 10:24:13 -07:00
memory migrate memory banks to Resource and new registration (#411) 2024-11-11 17:10:44 -08:00
memory_banks Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
models Fix opentelemetry adapter (#510) 2024-11-22 18:18:11 -08:00
post_training Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
safety Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
scoring Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
scoring_functions Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
shields Remove the "ShieldType" concept (#430) 2024-11-12 12:37:24 -08:00
synthetic_data_generation Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
telemetry Add version to REST API url (#478) 2024-11-18 22:44:14 -08:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
resource.py Enable sane naming of registered objects with defaults (#429) 2024-11-12 11:18:05 -08:00
version.py Fix the pyopenapi generator avoid potential circular imports 2024-11-18 23:37:52 -08:00