graphiti/examples/opentelemetry
facronactz a7f2c92bb4 feat: Add support for Chutes API integration
- Introduced CHUTES_API_TOKEN in .env.example files for configuration.
- Updated README.md in quickstart example to include Chutes API setup.
- Created quickstart_chutes.py example for demonstrating Chutes integration.
- Added ChutesEmbedder and ChutesClient classes for embedding and LLM functionalities.
- Updated LLM and embedder provider configurations to support Chutes.
- Enhanced factories to include Chutes client and embedder.
- Modified schema.py to define Chutes provider configuration.
- Updated mcp_server configuration files to integrate Chutes API.
- Added necessary dependencies in pyproject.toml for Chutes support.
2025-11-15 16:12:09 +07:00
..
.env.example feat: Add support for Chutes API integration 2025-11-15 16:12:09 +07:00
otel_stdout_example.py Add OpenTelemetry stdout example with Kuzu (#987) 2025-10-07 07:29:35 -07:00
pyproject.toml Add OpenTelemetry stdout example with Kuzu (#987) 2025-10-07 07:29:35 -07:00
README.md Add OpenTelemetry stdout example with Kuzu (#987) 2025-10-07 07:29:35 -07:00
uv.lock Add OpenTelemetry stdout example with Kuzu (#987) 2025-10-07 07:29:35 -07:00

OpenTelemetry Stdout Tracing Example

Configure Graphiti with OpenTelemetry to output trace spans to stdout.

Setup

uv sync
export OPENAI_API_KEY=your_api_key_here
uv run otel_stdout_example.py

Configure OpenTelemetry with Graphiti

from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import ConsoleSpanExporter, SimpleSpanProcessor

# Set up OpenTelemetry with stdout exporter
provider = TracerProvider()
provider.add_span_processor(SimpleSpanProcessor(ConsoleSpanExporter()))
trace.set_tracer_provider(provider)

# Get tracer and pass to Graphiti
tracer = trace.get_tracer(__name__)
graphiti = Graphiti(
    graph_driver=kuzu_driver,
    tracer=tracer,
    trace_span_prefix='graphiti.example'
)