commits
attributes now copy string data into internal storage instead of
storing pointers. this fixes segfaults when arena-allocated strings
are passed as span attributes - the data outlives the arena.
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
track current span ID on thread so child spans can reference their
parent. when creating a span while another is active:
- capture current span as parent_span_id
- update tl_current_span_id to new span
- on span end, restore parent as current
adds parentSpanId to OTLP JSON output when present.
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
concurrent requests on different thread pool workers were sharing
the same trace_id because current_trace_id was process-global.
now each thread has its own trace context via threadlocal:
- tl_trace_id: current trace ID for this thread
- tl_active_span_count: span nesting depth for this thread
this ensures each HTTP request gets its own trace_id even when
handled by different workers concurrently.
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
the OTLP JSON format expects asInt/asDouble and histogram counts
to be numbers, not strings. only timestamps are strings.
compared against official examples in opentelemetry-proto repo.
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. trace ID: generate new ID for each root span (when no active spans)
- add active_span_count tracking
- add newTrace() for explicit trace boundaries
2. metrics: change from cumulative to delta temporality
- each counter() call is an increment, not aggregated total
3. memory: track allocated NumberDataPoints and free on flush
- allocated_data_points list tracks allocations
- freed in flush() and deinit()
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
flushes pending data every batch_timeout_ms (default 500ms).
stops cleanly on shutdown().
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- metrics: Counter, Gauge, UpDownCounter, Histogram, ExponentialHistogram
- attributes: typed key-value pairs for spans/logs/metrics
- exporter: rewrite with std.json.Stringify (no manual string building)
- root: add counter(), gaugeInt(), gaugeDouble() convenience functions
- CLAUDE.md: project patterns and zig 0.15 notes
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
working:
- config with env var resolution (LOGFIRE_WRITE_TOKEN, LOGFIRE_TOKEN)
- OTLP HTTP/JSON export to /v1/traces and /v1/logs
- span tracking with timing
- structured logging with severity levels
- console fallback when no token
pending:
- attribute storage for spans/logs
- metrics (counter, gauge, histogram)
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
attributes now copy string data into internal storage instead of
storing pointers. this fixes segfaults when arena-allocated strings
are passed as span attributes - the data outlives the arena.
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
track current span ID on thread so child spans can reference their
parent. when creating a span while another is active:
- capture current span as parent_span_id
- update tl_current_span_id to new span
- on span end, restore parent as current
adds parentSpanId to OTLP JSON output when present.
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
concurrent requests on different thread pool workers were sharing
the same trace_id because current_trace_id was process-global.
now each thread has its own trace context via threadlocal:
- tl_trace_id: current trace ID for this thread
- tl_active_span_count: span nesting depth for this thread
this ensures each HTTP request gets its own trace_id even when
handled by different workers concurrently.
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
the OTLP JSON format expects asInt/asDouble and histogram counts
to be numbers, not strings. only timestamps are strings.
compared against official examples in opentelemetry-proto repo.
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. trace ID: generate new ID for each root span (when no active spans)
- add active_span_count tracking
- add newTrace() for explicit trace boundaries
2. metrics: change from cumulative to delta temporality
- each counter() call is an increment, not aggregated total
3. memory: track allocated NumberDataPoints and free on flush
- allocated_data_points list tracks allocations
- freed in flush() and deinit()
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- metrics: Counter, Gauge, UpDownCounter, Histogram, ExponentialHistogram
- attributes: typed key-value pairs for spans/logs/metrics
- exporter: rewrite with std.json.Stringify (no manual string building)
- root: add counter(), gaugeInt(), gaugeDouble() convenience functions
- CLAUDE.md: project patterns and zig 0.15 notes
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
working:
- config with env var resolution (LOGFIRE_WRITE_TOKEN, LOGFIRE_TOKEN)
- OTLP HTTP/JSON export to /v1/traces and /v1/logs
- span tracking with timing
- structured logging with severity levels
- console fallback when no token
pending:
- attribute storage for spans/logs
- metrics (counter, gauge, histogram)
馃 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>