How It Works
This experimental forwarder service acts as a proxy between OpenTelemetry-instrumented applications and SGP’s tracing system. When you send OTLP traces to the SGP OpenTelemetry endpoint, the service automatically converts them into SGP’s internal tracing format. The conversion process maps OpenTelemetry’s GenAI semantic conventions to SGP metadata (such as model names, token counts, and provider information), auto-detects frameworks like Pydantic AI to extract input and output data, and infers operation types including completions, retrieval, reranking, and other operations. For detailed information on GenAI semantic conventions, refer to the OpenTelemetry GenAI attributes specification.Prerequisites
To use the OpenTelemetry integration, you’ll need:- SGP API credentials: Your API key and account ID
- OpenTelemetry SDK: Install the appropriate SDK for your language
- OTLP endpoint:
https://opentelemetry.<sgp-url-placeholder>
Usage Examples
These examples show how to use ecosystem integrations with SGP’s OpenTelemetry forwarder.OpenAI with OpenLLMetry
OpenLLMetry provides automatic instrumentation for OpenAI and other LLM providers:Python
OpenAI Agents SDK with Logfire
Logfire can instrument the OpenAI Agents SDK for comprehensive observability:Python
Pydantic AI with Logfire
Pydantic AI integrates with Logfire for observability. You can redirect Logfire traces to SGP by configuring the OpenTelemetry SDK providers:Python
LangChain with LangSmith
LangChain’s observability can be configured to export traces via OpenTelemetry. Note that LangChain requires the full/v1/traces path in the endpoint URL:
Python
Viewing Traces
After sending traces, view them in the SGP UI:- Navigate to your application in the SGP dashboard
- Go to the Traces tab
- Filter and drill down into your OTLP-generated traces

