OpenTelemetry
Nyraxis collects traces via OTLP from any OpenTelemetry-instrumented application automatically.
Overview
Nyraxis natively ingests traces via the OpenTelemetry Protocol (OTLP). Any application instrumented with OpenTelemetry — including LLM libraries with auto-instrumentation — automatically sends telemetry to Nyraxis without code changes.
Setup
Point your OTLP exporter to your Nyraxis endpoint:
export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.nyraxis.com"
export OTEL_EXPORTER_OTLP_HEADERS="x-nyraxis-api-key=your-api-key"
export OTEL_SERVICE_NAME="my-llm-app"Auto-Instrumentation
Any OpenTelemetry-instrumented LLM library works with Nyraxis out of the box:
pip install opentelemetry-api opentelemetry-sdk opentelemetry-exporter-otlpfrom opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
provider = TracerProvider()
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
trace.set_tracer_provider(provider)Manual Span Creation
Add custom spans to capture LLM-specific context:
tracer = trace.get_tracer("my-llm-app")
with tracer.start_as_current_span("llm.chat") as span:
span.set_attribute("llm.model", "gpt-4")
span.set_attribute("llm.prompt_tokens", 150)
span.set_attribute("llm.completion_tokens", 80)
response = call_llm(prompt)What Gets Protected
- All OpenTelemetry-instrumented LLM libraries (LangChain, LlamaIndex, OpenAI SDK) automatically report to Nyraxis
- Manual spans give you fine-grained visibility into custom LLM workflows
- No vendor-specific SDK required — standard OTLP is all you need
- Traces, latency, token usage, and error rates are captured and analyzed