agentleFS
SentryKnown publishergetsentry/streams/sentry_streams/AGENTS.md

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.

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
  1. Distinctive:

    Recommended: Use the repository root Makefile commands documented in ../AGENTS.md:

    line 33
  2. Distinctive:

    If working directly in the package directory without using the root Makefile:

    line 50
  3. Distinctive:

    When not using the root Makefile:

    line 61
  4. Distinctive:

    When making changes to Rust code:

    line 133
  5. Very specific:

    Recommended: Use make reset from repository root.

    line 156
  6. Very specific:

    Always work within the virtual environment (.venv)

    line 168

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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_streams directory.

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 code
    • adapters/ - Adapter implementations for different streaming backends
    • pipeline/ - 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 applications
    • metrics/ - 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 suite
  • integration_tests/ - Integration tests
  • docs/ - 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 environment
  • make tests-streams - Run Python tests
  • make tests-integration - Run integration tests
  • make tests-rust-streams - Run Rust tests
  • make typecheck - Run type checking
  • make build-streams - Build wheel package
  • make 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 sync

This 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 test

Type 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 --wheel

Wheels 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 clean

Recommended: 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 maturin as its build backend
  • For general repository information and prerequisites, see ../AGENTS.md

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.