streams / sentry_streams
AGENTS.md5 starsChanged 7 months agoApache-2.0View on GitHub
Note: For general repository setup, testing, and type checking commands, see ../AGENTS.md. This file contains package-specific details for working directly within the sentry_streams directory. sentry_streams is the core streaming platform implementation for Sentry. It's a hybrid Rust/Python package built using Maturin that provides the fundamental APIs and runtime for building streaming applications. It contains the Streaming application data model, the DSL to represent dataflow applications, the runner CLI script and the Arroyo adapter to run the application on single nodes.
- Deletes or force-pushes
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- sentry_streams_k8s/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- sentry_streams/CLAUDE.mdCLAUDE.md
- sentry_streams_k8s/CLAUDE.mdCLAUDE.md
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Recommended: Use the repository root Makefile commands documented in ../AGENTS.md:
- Distinctive: line 50
If working directly in the package directory without using the root Makefile:
- Distinctive: line 61
When not using the root Makefile:
- Distinctive: line 133
When making changes to Rust code:
- Very specific: line 156
Recommended: Use make reset from repository root.
- Very specific: line 168
Always work within the virtual environment (.venv)
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md - sentry_streams Package
Note: For general repository setup, testing, and type checking commands, see ../AGENTS.md. This file contains package-specific details for working directly within the
sentry_streamsdirectory.
Package Overview
sentry_streams is the core streaming platform implementation for Sentry. It's a hybrid Rust/Python package built using Maturin that provides the fundamental APIs and runtime for building streaming applications.
It contains the Streaming application data model, the DSL to represent dataflow applications, the runner CLI script and the Arroyo adapter to run the application on single nodes.
Package Structure
sentry_streams/- Python package source codeadapters/- Adapter implementations for different streaming backendspipeline/- Pipeline construction and execution logic. This package contains the DSL to compose streaming applications, it contains the definition of the primitives and the parser.examples/- Example streaming applicationsmetrics/- Metrics and monitoring utilities
src/- Rust source code for the Rust runtime. It contains an Arroyo based consumer that is capable of running the pipeline defined above.tests/- Python test suiteintegration_tests/- Integration testsdocs/- Sphinx documentation
Architecture documents
Architecture is described here
Quick Start
Recommended: Use the repository root Makefile commands documented in ../AGENTS.md:
make install-dev- Set up development environmentmake tests-streams- Run Python testsmake tests-integration- Run integration testsmake tests-rust-streams- Run Rust testsmake typecheck- Run type checkingmake build-streams- Build wheel packagemake docs- Build documentation
Virtual Environment - REQUIRED
You MUST use a virtual environment when developing this package. The package uses a .venv directory managed by uv.
Package-Specific Development
Manual Setup (Alternative to make install-dev)
If working directly in the package directory without using the root Makefile:
cd sentry_streams
uv syncThis creates .venv/ and installs all dependencies including development tools.
Running Tests from Package Directory
When not using the root Makefile:
# Python tests
.venv/bin/pytest -vv tests/
# Integration tests
.venv/bin/pytest -vv integration_tests/
# Specific test
.venv/bin/pytest -vv tests/test_pipeline.py::test_specific_function
# Rust tests
source .venv/bin/activate
source ../scripts/rust-envvars
cargo testType Checking from Package Directory
Manual type checking requires building Rust modules first:
# Build Rust test modules first (required for complete type checking)
cd sentry_streams/examples/rust_simple_map_filter/rust_transforms/
source ../../../../.venv/bin/activate
maturin develop
cd -
cd tests/rust_test_functions/
source ../../.venv/bin/activate
maturin develop
cd -
# Run mypy
.venv/bin/mypy --config-file mypy.ini --strict sentry_streams/Note: Using make typecheck from the repository root is recommended as it handles all build steps automatically.
Type Checking Configuration
Type checking is configured in mypy.ini:
- Python version: 3.11
- Strict mode enabled
- Missing imports are flagged as errors
- Untyped imports are allowed for Rust modules (
rust_streams.*)
Building from Package Directory
Manual wheel building:
uv pip install wheel build
.venv/bin/python -m build --wheelWheels are created in dist/. Recommended: Use make build-streams from repository root.
Building Documentation from Package Directory
uv sync --group docs
.venv/bin/sphinx-build -b html docs/source/ docs/build/Documentation is built in docs/build/. Recommended: Use make docs from repository root.
Package-Specific Notes
Developing Rust Components
When making changes to Rust code:
# Rebuild the Rust module
source .venv/bin/activate
source ../scripts/rust-envvars
maturin develop
# Run Rust tests
cargo test
# Run Python tests that use Rust components
pytest -vv tests/Cleaning Build Artifacts
# Manual cleanup
rm -rf .venv
cargo cleanRecommended: Use make reset from repository root.
Package Configuration
Build System
- Build backend:
maturin>=1.5.1- Handles both Python and Rust compilation - Python requirement:
>=3.11 - Key runtime deps:
sentry-arroyo,pyyaml,jsonschema,sentry-kafka-schemas,polars,click,datadog
Important Package-Specific Notes
- Always work within the virtual environment (
.venv) - Rust components must be built before type checking can complete successfully
- The package is a hybrid Rust/Python package using
maturinas its build backend - For general repository information and prerequisites, see ../AGENTS.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

