# OpenTelemetry configuration
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4317
```

### Instrumentation Setup

The framework automatically sets up OpenTelemetry instrumentation in `src/instrumentation.ts`:

## Examples in the Codebase

### Agent Operations

See `src/agents/Agent.ts` for span usage in agent generation and tool execution.

**Example from Agent.ts:**

```typescript
// Class: Agent
// Function: generate
return tracer.startActiveSpan(
  "agent.generate",
  {
    attributes: {
      "agent.id": this.id,
      "agent.name": this.name,
    },
  },
  async (span: Span) => {
    // ... implementation
  }
);
```

## Summary

Spans provide powerful observability into your Inkeep Agent Framework operations. By following these patterns:

1. **Use `getTracer()`** for consistent tracing
2. **Use consistent naming**
3. **Set meaningful attributes** for searchability
4. **Handle errors properly** using `setSpanWithError` for consistent error handling
5. **Use `startActiveSpan`** for automatic lifecycle management

This will give you comprehensive visibility into your agent operations, making debugging and performance optimization much easier.