The Dynatrace Full-Stack observability platform combined with Traceloop's OpenLLMetry OpenTelemetry SDK can seamlessly provide comprehensive insights into large language models (LLMs) in production environments. By observing AI models, businesses can make informed decisions, optimize performance, and ensure compliance with emerging AI regulations.
Create a Dynatrace token so you can report AI observability data to your Dynatrace tenant.
To create a Dynatrace token
metrics.ingest)logs.ingest)openTelemetryTrace.ingest)You can only access your token once upon creation. You can't reveal it afterward.
Choose your instrumentation framework and language to get started.
The Dynatrace backend exclusively works with delta values and requires the respective aggregation temporality. Set the OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE environment variable to DELTA.
OpenLLMetry provides auto-instrumentation for popular AI frameworks and automatically collects GenAI semantic conventions.
We can leverage OpenTelemetry to provide autoinstrumentation that collects traces and metrics of your AI workloads, particularly OpenLLMetry that can be installed with the following command:
pip install traceloop-sdk
Afterward, add the following code at the beginning of your main file.
from traceloop.sdk import Traceloopheaders = { "Authorization": "Api-Token <YOUR_DT_API_TOKEN>" }Traceloop.init(app_name="<your-service>",api_endpoint="https://<YOUR_ENV>.live.dynatrace.com/api/v2/otlp", # or OpenTelemetry Collector URLheaders=headers)