llama-stack-mirror/llama_stack/distribution
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
..
routers register with provider even if present in stack (#491) 2024-11-20 11:05:50 -08:00
server Fix opentelemetry adapter (#510) 2024-11-22 18:18:11 -08:00
store init registry once (#450) 2024-11-13 22:20:57 -08:00
utils use logging instead of prints (#499) 2024-11-21 11:32:53 -08:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
build.py we do want prints in print_pip_install_help 2024-11-22 13:32:54 -08:00
build_conda_env.sh fix prompt guard (#177) 2024-10-03 11:07:53 -07:00
build_container.sh Make run yaml optional so dockers can start with just --env (#492) 2024-11-20 13:11:40 -08:00
client.py use API version in "remote" stack client 2024-11-19 15:59:47 -08:00
common.sh API Updates (#73) 2024-09-17 19:51:35 -07:00
configure.py use logging instead of prints (#499) 2024-11-21 11:32:53 -08:00
configure_container.sh docker: Check for selinux before using --security-opt (#167) 2024-10-02 10:37:41 -07:00
datatypes.py Auto-generate distro yamls + docs (#468) 2024-11-18 14:57:06 -08:00
distribution.py Kill "remote" providers and fix testing with a remote stack properly (#435) 2024-11-12 21:51:29 -08:00
inspect.py Remove "routing_table" and "routing_key" concepts for the user (#201) 2024-10-10 10:24:13 -07:00
request_headers.py use logging instead of prints (#499) 2024-11-21 11:32:53 -08:00
resolver.py another print -> log fix 2024-11-22 13:35:34 -08:00
stack.py use logging instead of prints (#499) 2024-11-21 11:32:53 -08:00
start_conda_env.sh Move to use argparse, fix issues with multiple --env cmdline options 2024-11-18 16:31:59 -08:00
start_container.sh Move to use argparse, fix issues with multiple --env cmdline options 2024-11-18 16:31:59 -08:00