> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# otel

## GalileoOTLPExporter

OpenTelemetry OTLP span exporter preconfigured for Galileo platform integration.

This exporter extends the standard OTLPSpanExporter with Galileo-specific
configuration and authentication. For most applications, consider using
GalileoSpanProcessor instead, which provides a complete tracing solution.

### export

```python theme={null}
def export(self, spans: typing.Sequence[Any]) -> 'Any'
```

Override export to set resource attributes from span attributes before serialization.

## GalileoSpanProcessor

Complete OpenTelemetry span processor with integrated Galileo export functionality.

This processor combines span processing and export capabilities into a single
component that can be directly attached to any OpenTelemetry TracerProvider.
It handles the complete lifecycle of spans from creation to export to Galileo.

**Examples**

```python theme={null}
from opentelemetry.sdk.trace import TracerProvider
tracer_provider = TracerProvider()
processor = GalileoSpanProcessor(project="my-project")
add_galileo_span_processor(tracer_provider, processor)
```

### exporter

```python theme={null}
def exporter(self) -> GalileoOTLPExporter
```

Access to the underlying Galileo OTLP exporter instance.

### force\_flush

```python theme={null}
def force_flush(self, timeout_millis: int=40000) -> None
```

Force immediate export of all pending spans with specified timeout.

### on\_end

```python theme={null}
def on_end(self, span: Span) -> None
```

Handle span completion events by delegating to the underlying processor.

### on\_start

```python theme={null}
def on_start(self,
             span: Span,
             parent_context: Optional[context.Context]=None) -> None
```

Handle span start events by delegating to the underlying processor.

### processor

```python theme={null}
def processor(self) -> SpanProcessor
```

Access to the underlying OpenTelemetry span processor instance.

### shutdown

```python theme={null}
def shutdown(self) -> None
```

Gracefully shutdown the processor and flush any remaining spans.

## add\_galileo\_span\_processor

```python theme={null}
def add_galileo_span_processor(tracer_provider: TracerProvider,
                               processor: GalileoSpanProcessor) -> None
```

Add the Galileo span processor to the tracer provider.
