Skip to content

refactor: remove metrics module and sampling configuration#17

Merged
deborahjacob-botanu merged 3 commits intomainfrom
developer-deborah
Feb 6, 2026
Merged

refactor: remove metrics module and sampling configuration#17
deborahjacob-botanu merged 3 commits intomainfrom
developer-deborah

Conversation

@deborahjacob-botanu
Copy link
Collaborator

Cost attribution requires 100% trace capture. Removed:

  • metrics.py module (redundant with trace-based aggregation)
  • trace_sample_rate config option
  • BOTANU_TRACE_SAMPLE_RATE environment variable

Backend aggregates costs from traces by run_id.

Summary

Changes

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • CI / build / tooling

Testing

  • Unit tests pass (pytest)
  • Lint passes (ruff check)
  • Type check passes (mypy)

Checklist

  • My code follows the project's coding style
  • I have added SPDX headers to new files
  • I have added tests for my changes
  • I have updated documentation if needed
  • All commits are signed off (git commit -s) per the DCO

Initial implementation of the Botanu SDK providing run-level cost
attribution for AI workflows.

Features:
- @botanu_use_case decorator for entry point registration
- UUIDv7 run_id generation and W3C Baggage propagation
- Auto-instrumentation for LLM providers (OpenAI, Anthropic, etc.)
- Auto-instrumentation for databases, HTTP clients, frameworks
- Kubernetes zero-code deployment via OTel Operator
- AttemptLedger for durable cost tracking
- 100% trace capture (no sampling) for accurate cost attribution

Documentation:
- Getting started guide and quickstart
- Kubernetes deployment guide for 2000+ services
- API reference for decorators and configuration
- Best practices and anti-patterns

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Deborah Jacob <deborah@botanu.ai>
Signed-off-by: deborahjacob-botanu <deborah@botanu.ai>
Supports:
- TestPyPI publishing via workflow_dispatch
- PyPI publishing on release
- OIDC trusted publisher (no tokens needed)

Signed-off-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Deborah Jacob <deborah@botanu.ai>
@deborahjacob-botanu deborahjacob-botanu merged commit 3bee454 into main Feb 6, 2026
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments