Otel
LlamaIndexOpenTelemetry #
Bases: BaseModel
LlamaIndexOpenTelemetry is a configuration and integration class for OpenTelemetry tracing within LlamaIndex. This class manages the setup and registration of OpenTelemetry span and event handlers, configures the tracer provider, and exports trace data using the specified span exporter and processor. It supports both simple and batch span processors, and allows customization of the service name or resource, as well as the dispatcher name.
Attributes:
| Name | Type | Description |
|---|---|---|
span_exporter |
Optional[SpanExporter]
|
The OpenTelemetry span exporter. Defaults to ConsoleSpanExporter. |
span_processor |
Literal['simple', 'batch']
|
The span processor type, either 'simple' or 'batch'. Defaults to 'batch'. |
service_name_or_resource |
Union[str, Resource]
|
The service name or OpenTelemetry Resource. Defaults to a Resource with service name 'llamaindex.opentelemetry'. |
Source code in llama-index-integrations/observability/llama-index-observability-otel/llama_index/observability/otel/base.py
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | |
start_registering #
start_registering() -> None
Starts LlamaIndex instrumentation.
Source code in llama-index-integrations/observability/llama-index-observability-otel/llama_index/observability/otel/base.py
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | |
options: members: - LlamaIndexOpenTelemetry