mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 20:12:33 +00:00
feat(otel): docs
This commit is contained in:
parent
deedb3fb46
commit
da7a95b104
2 changed files with 64 additions and 0 deletions
10
docs/docs/providers/instrumentation/index.mdx
Normal file
10
docs/docs/providers/instrumentation/index.mdx
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
sidebar_label: Instrumentation
|
||||
title: Instrumentation
|
||||
---
|
||||
|
||||
# Instrumentation
|
||||
|
||||
## Overview
|
||||
|
||||
This section contains documentation for all available providers for telemetry instrumentation.
|
||||
54
docs/docs/providers/instrumentation/inline_otel.mdx
Normal file
54
docs/docs/providers/instrumentation/inline_otel.mdx
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
description: "Reference Open Telemetry Instrumentation"
|
||||
sidebar_label: Open Telemetry
|
||||
title: inline::otel
|
||||
---
|
||||
|
||||
# inline::otel
|
||||
|
||||
## Description
|
||||
|
||||
Reference implementation of telemetry and observability using OpenTelemetry.
|
||||
|
||||
When using open telemetry, please make sure to set the OTLP endpoint and protocol environment variables, or telemetry will not get exported.
|
||||
|
||||
```sh
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT="https://127.0.0.1:4318"
|
||||
```
|
||||
|
||||
For advanced environment variable configuration, refer to the [sdk documentation](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/).
|
||||
Otherwise, some basic settings can be set in the config for the otel telemetry provider.
|
||||
|
||||
## Configuration
|
||||
|
||||
| Field | Type | Required | Default | Description |
|
||||
|-------|------|----------|---------|-------------|
|
||||
| `service_name` | `str \| None` | No | | Service name (overridden by OTEL_SERVICE_NAME env var) |
|
||||
| `span_processor` | `batch | simple | None` | No | "batch" | Span processor type (overridden by OTEL_SPAN_PROCESSOR env var) |
|
||||
|
||||
## Sample Configuration
|
||||
|
||||
```yaml
|
||||
instrumentation:
|
||||
provider: otel
|
||||
config:
|
||||
service_name: my service name
|
||||
span_processor: batch
|
||||
```
|
||||
|
||||
Note that passing a config is optional for instrumentation providers, since configuration by environment variable is usually preferable.
|
||||
|
||||
```sh
|
||||
export OTEL_SERVICE_NAME
|
||||
|
||||
```yaml
|
||||
instrumentation:
|
||||
provider: otel
|
||||
```
|
||||
|
||||
Finally, run llama stack with automatic instrumentation
|
||||
|
||||
```sh
|
||||
opentelemetry-instrument llama stack run config.yaml
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue