> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenLLMetry

> OpenLLMetry ile TokenLab OpenAI uyumlu isteklerini izleyin

## Genel Bakış

OpenLLMetry'nin OpenAI enstrümantasyonu, resmi OpenAI SDK'sı üzerinden yapılan çağrıları izler. İlgili SDK'yı TokenLab'in `/v1` temel URL'si ile yapılandırın.

<Note>
  **Tür**: Gözlemlenebilirlik (Observability)

  **Birincil Yol**: OpenAI SDK enstrümantasyonu

  **Destek Güveni**: Desteklenen OpenAI uyumlu gözlemlenebilirlik yolu
</Note>

## Kurulum

```bash theme={null}
pip install opentelemetry-instrumentation-openai openai
```

## Ortam

```bash theme={null}
export TOKENLAB_API_KEY="sk-your-tokenlab-key"
```

## Örnek

```python theme={null}
import os

from openai import OpenAI
from opentelemetry.instrumentation.openai import OpenAIInstrumentor

OpenAIInstrumentor().instrument()

client = OpenAI(
    api_key=os.environ["TOKENLAB_API_KEY"],
    base_url="https://api.tokenlab.sh/v1",
)

client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Trace this request"}],
)
```

## Endpoint Notları

OpenAI SDK uyumlu TokenLab çağrıları için bu yolu kullanın. TokenLab yerel (native) endpoint'leri için, bu istekleri fiilen gönderen HTTP veya SDK istemcisini enstrümante edin.
