Skip to content

Commit 9bda631

Browse files
pavanputhraclaude
andcommitted
docs: document OTEL tracing configuration for Langfuse and multi-backend fan-out
Adds setup instructions for sending LLM traces to Langfuse via OTLP, and a general fan-out pattern using the OTel Collector to send to multiple backends simultaneously (e.g. SigNoz + Langfuse). Updates README monitoring section to be backend-agnostic. Closes CON-180 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5320dd4 commit 9bda631

2 files changed

Lines changed: 126 additions & 3 deletions

File tree

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,11 +788,14 @@ tracers:
788788
789789
## Monitoring and Logging
790790
791-
The system includes built-in monitoring through Datadog. Configure monitoring by setting the following environment variables:
791+
vCon Server is instrumented with OpenTelemetry and can send traces and metrics to any OTLP-compatible backend. See [docs/operations/monitoring.md](docs/operations/monitoring.md) for full configuration details, including how to fan out to multiple backends simultaneously using the OTel Collector.
792+
793+
Quick setup — add to your `.env`:
792794
793795
```bash
794-
DD_API_KEY=your_datadog_api_key
795-
DD_SITE=datadoghq.com
796+
OTEL_EXPORTER_OTLP_ENDPOINT=<your-backend-otlp-endpoint>
797+
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf # or grpc
798+
OTEL_EXPORTER_OTLP_HEADERS=<auth-header-if-required>
796799
```
797800
798801
View logs using:

docs/operations/monitoring.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,126 @@ service:
145145
exporters: [prometheus]
146146
```
147147
148+
### Langfuse Integration
149+
150+
Langfuse accepts traces via the standard OTLP HTTP endpoint — no separate collector needed.
151+
152+
#### Step 1 — Generate your auth header
153+
154+
In Langfuse, go to **Settings → API Keys** and copy your Public Key and Secret Key. Then run:
155+
156+
```bash
157+
echo -n "pk-lf-YOUR_PUBLIC_KEY:sk-lf-YOUR_SECRET_KEY" | base64
158+
```
159+
160+
Copy the output for the next step.
161+
162+
#### Step 2 — Set environment variables
163+
164+
Add the following to your `.env` file:
165+
166+
```bash
167+
OTEL_EXPORTER_OTLP_ENDPOINT=http://<your-langfuse-host>:3000/api/public/otel
168+
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
169+
OTEL_EXPORTER_OTLP_HEADERS=Authorization=Basic <output_from_step_1>
170+
```
171+
172+
For Langfuse Cloud use:
173+
174+
```bash
175+
OTEL_EXPORTER_OTLP_ENDPOINT=https://cloud.langfuse.com/api/public/otel
176+
```
177+
178+
Traces will appear in Langfuse under the service names `conserver` and `api`.
179+
180+
### Sending to Multiple Backends (Fan-out via OTel Collector)
181+
182+
vCon Server can only point to one OTLP endpoint via environment variables. To fan out to multiple backends simultaneously, use the OTel Collector as a proxy. The example below uses SigNoz and Langfuse, but the same pattern works with any two OTLP-compatible backends.
183+
184+
```
185+
vcon-server ──OTLP──▶ OTel Collector ──▶ Backend A (gRPC :4317)
186+
└──▶ Backend B (HTTP)
187+
```
188+
189+
#### Step 1 — Point vCon Server at the collector
190+
191+
In your `.env`:
192+
193+
```bash
194+
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
195+
OTEL_EXPORTER_OTLP_PROTOCOL=grpc
196+
```
197+
198+
No auth header needed here — the collector handles authentication to each backend separately.
199+
200+
#### Step 2 — Add the collector to docker-compose.yml
201+
202+
```yaml
203+
services:
204+
otel-collector:
205+
image: otel/opentelemetry-collector-contrib:latest
206+
command: ["--config=/etc/otel-collector-config.yaml"]
207+
volumes:
208+
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
209+
ports:
210+
- "4317:4317"
211+
networks:
212+
- conserver
213+
```
214+
215+
> Use `otel/opentelemetry-collector-contrib` (not the slim `otel/opentelemetry-collector`) — it includes the `otlphttp` exporter needed for Langfuse.
216+
217+
#### Step 3 — Configure the collector (otel-collector-config.yaml)
218+
219+
Generate your Langfuse Basic auth token first:
220+
221+
```bash
222+
echo -n "pk-lf-YOUR_PUBLIC_KEY:sk-lf-YOUR_SECRET_KEY" | base64
223+
```
224+
225+
Then create `otel-collector-config.yaml`:
226+
227+
```yaml
228+
receivers:
229+
otlp:
230+
protocols:
231+
grpc:
232+
endpoint: 0.0.0.0:4317
233+
234+
processors:
235+
batch:
236+
237+
exporters:
238+
# SigNoz — receives OTLP gRPC
239+
otlp/signoz:
240+
endpoint: <your-signoz-host>:4317
241+
tls:
242+
insecure: true
243+
244+
# Langfuse — receives OTLP HTTP
245+
otlphttp/langfuse:
246+
endpoint: http://<your-langfuse-host>:3000/api/public/otel
247+
headers:
248+
Authorization: "Basic <base64_from_above>"
249+
250+
service:
251+
pipelines:
252+
traces:
253+
receivers: [otlp]
254+
processors: [batch]
255+
exporters: [otlp/signoz, otlphttp/langfuse]
256+
metrics:
257+
receivers: [otlp]
258+
processors: [batch]
259+
exporters: [otlp/signoz]
260+
```
261+
262+
> Langfuse only ingests **traces** (LLM spans). Metrics go to SigNoz only.
263+
264+
Traces will appear in both backends. In Langfuse, look under service names `conserver` and `api`.
265+
266+
---
267+
148268
## Prometheus Integration
149269

150270
### Metrics Endpoint

0 commit comments

Comments
 (0)