Skip to main content

SDK Configuration Options

OpenLIT offers automatic instrumentation with OpenTelemetry for various LLM providers, frameworks, and VectorDBs, enabling you to gain valuable insights into the behavior and performance of your AI applications through metrics.

Quickstart: LLM Observablity

Production-ready AI monitoring setup in 2 simple steps with zero code changes

Integrations

60+ AI integrations with automatic instrumentation and performance tracking

Disable Metrics

You have the option to disable the collection of metrics if needed. By default, metrics collection is enabled. Example:

Using an existing OTel MeterProvider

If your application already configures OpenTelemetry, OpenLIT reuses it instead of creating its own. Set your SDK MeterProvider as the global provider before calling openlit.init(); OpenLIT detects it and attaches its instrumentation to that provider. openlit.init() does not take a meter argument. When an existing provider is reused, OpenLIT does not add exporters to it, so otlp_endpoint / otlp_headers have no effect. Configure exporters on your own MeterProvider. Example:

Add custom resource attributes

The OTEL_RESOURCE_ATTRIBUTES environment variable allows you to provide additional OpenTelemetry resource attributes when starting your application with OpenLIT. OpenLIT already includes some default resource attributes:
  • telemetry.sdk.name: openlit
  • service.name: YOUR_SERVICE_NAME
  • deployment.environment: YOUR_ENVIRONMENT_NAME
You can enhance these default resource attributes by adding your own using the OTEL_RESOURCE_ATTRIBUTES variable. Your custom attributes will be added on top of the existing OpenLIT attributes, providing additional context to your telemetry data. Simply format your attributes as key1=value1,key2=value2. For example:

Deploy OpenLIT

Deployment options for scalable LLM monitoring infrastructure

Integrations

60+ AI integrations with automatic instrumentation and performance tracking

Destinations

Send elemetry to Datadog, Grafana, New Relic, and other observability stacks