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
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | |
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
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | |
options: members: - LlamaIndexOpenTelemetry