Skip to main content
Galileo’s OTLP provider conforms to OpenTelemetry and OpenInference semantic conventions. To ensure your spans are valid and properly processed, follow these guidelines.

Semantic Conventions

Galileo supports two complementary semantic convention standards:
  1. OpenTelemetry GenAI Semantic ConventionsSemantic Conventions for GenAI agent and framework spans
  2. OpenInferenceOpenInference Semantic Conventions
When using automatic instrumentation libraries (like Traceloop/OpenLLMetry), these requirements are typically handled automatically. When creating custom spans, ensure you follow both the OpenTelemetry GenAI conventions and any framework-specific guidelines.

Minimum Requirements for Valid Spans

For a span to be considered valid, it must include certain required attributes depending on the span type.

Agent Spans

LLM Spans

Tool Execution Spans

Retriever Spans

Retriever spans are typically detected automatically when db.operation is set to query or search. The output should be a list of documents, which will be formatted appropriately by Galileo’s OTLP provider.

Workflow Spans

Workflow spans represent higher-level orchestration units that coordinate multiple sub-operations, such as chains, pipelines, or multi-step processes.
Workflow spans are useful for grouping related operations together. When using the Galileo SDK’s start_galileo_span helper, workflow spans can contain nested child spans for LLM calls, tool executions, and retriever operations.

Error Handling

For spans that end in an error, you must include:
  • error.type — Describes the class of error (e.g., timeout, 500, exception name)
  • Span status — Should be set to ERROR with an appropriate error description
Python

Direct POST Calls to the OTLP Endpoint

You can make direct POST calls to the Galileo OTLP endpoint to send OTLP packets. This is useful for custom integrations or when you need to send pre-generated OTLP data.

Endpoint

Headers

The following headers are required:

Resource Attributes

When sending spans for experiments, you can attach Galileo-specific resource attributes to the spans in the protobuf payload. These attributes are used by the backend to route traces and attach ground truth data for metric evaluation.
If you are using the GalileoSpanProcessor from the Galileo SDK, these attributes are set automatically. You only need to set them manually when making direct POST calls.

Request Body

The request body should contain OTLP packets in protobuf format (binary). The payload should be an ExportTraceServiceRequest message as defined in the OpenTelemetry Protocol specification.

Response Codes

The request was successfully processed. The response body contains an ExportTraceServiceResponse in JSON format.If some spans were rejected, the response includes partial success information:
Even when the HTTP status is 200, check for partialSuccess in the response to determine if all spans were successfully processed.
The API key is missing or invalid.
The specified project was not found and could not be created.
The Content-Type header is not application/x-protobuf.
The request could not be processed. Common reasons include no spans found, trace processing failure, or missing Log stream ID.

Additional Resources

OpenTelemetry GenAI Conventions

Official OpenTelemetry semantic conventions for GenAI agent spans.

OpenInference Conventions

OpenInference semantic conventions reference.

OpenTelemetry Integration

Set up OpenTelemetry and OpenInference with Galileo.

Log with OTel and LangGraph

Step-by-step guide using OpenTelemetry with LangGraph and OpenAI.