Get started

  • Latest Dynatrace
  • How-to guide
  • 1-min read

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

Create a Dynatrace token so you can report AI observability data to your Dynatrace tenant.

Create a Dynatrace Token

To create a Dynatrace token

  1. In Dynatrace, go to Access Tokens.
    To find Access Tokens, press Ctrl/Cmd+K to search for and select Access Tokens.
  2. In Access Tokens, select Generate new token.
  3. Enter a Token name for your new token.
  4. Give your new token the following permissions:
  5. Search for and select all of the following scopes.
    • Ingest metrics (metrics.ingest)
    • Ingest logs (logs.ingest)
    • Ingest OpenTelemetry traces (openTelemetryTrace.ingest)
  6. Select Generate token.
  7. Copy the generated token to the clipboard. Store the token in a password manager for future use.

    You can only access your token once upon creation. You can't reveal it afterward.

Instrument your application

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 Traceloop
headers = { "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 URL
headers=headers
)
Related tags
AI Observability