Middleware
LLM Observability with Middleware and OpenLIT
To directly send OpenTelemetry metrics and traces generated by OpenLIT SDK from your LLM Application to Middleware, Follow the below steps.
Get your Middleware credentials
- Sign in to your Middleware account.
- Go to settings and click on API Key. Link
- Copy and save the value for
MW_API_KEY
andMW_TARGET
Add the following lines to your application code:
Run the following command to configure the OTEL endpoint and headers to send metrics and traces to Middleware:
Replace:
MW_TARGET
with your middleware target URL
- Example -
https://abcd.middleware.io:443
MW_API_KEY
with your middleware API key.
- Example - dxyxsdojzrgpsvizzzcsvhrwnmzqdsdsd
Refer to the OpenLIT Python SDK repository for more advanced configurations and use cases.
For detailed information on LLM Observability with Middleware and OpenLIT, consult Middleware Documentation: LLM Observability Documentation.
Visualize in Middleware
Once your LLM application is instrumented, you can view the traces, metrics and dashboards in the Middleware LLM Observability section. To access this:
- Log in to your Middleware account
- Navigate to the LLM Observability Section in the sidebar
Was this page helpful?