{"id":21483094,"url":"https://github.com/dashed/sentry-profile-hours-test","last_synced_at":"2025-08-03T19:10:41.950Z","repository":{"id":263505249,"uuid":"885588888","full_name":"dashed/sentry-profile-hours-test","owner":"dashed","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-18T22:18:59.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T18:50:53.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dashed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-08T22:17:20.000Z","updated_at":"2024-11-18T22:19:02.000Z","dependencies_parsed_at":"2024-11-19T06:32:51.899Z","dependency_job_id":null,"html_url":"https://github.com/dashed/sentry-profile-hours-test","commit_stats":null,"previous_names":["dashed/sentry-profile-hours-test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashed%2Fsentry-profile-hours-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashed%2Fsentry-profile-hours-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashed%2Fsentry-profile-hours-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashed%2Fsentry-profile-hours-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashed","download_url":"https://codeload.github.com/dashed/sentry-profile-hours-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244006304,"owners_count":20382444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T12:45:03.977Z","updated_at":"2025-08-03T19:10:41.939Z","avatar_url":"https://github.com/dashed.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentry Profile Hours Testing Tool\n\nA tool for testing Sentry profile hours billing with different profile types, platforms, and generation methods.\n\n## Overview\n\nThis tool allows you to quickly generate profile data to test how Sentry bills for profile hours. It supports:\n\n- Both transaction-based and continuous profiling\n- UI and backend platform profiles\n- Both AM2 and AM3 billing plans\n- Direct profile generation to create large volumes of data quickly\n\n## Quick Start\n\n```bash\n# Install dependencies with uv\nuv pip install -r requirements.txt\n\n# Run with a preset to generate profile hours\nuv run hello.py\n```\n\n## Setup with uv\n\nThis project uses [uv](https://github.com/astral-sh/uv), a modern Python package installer and resolver written in Rust.\n\n### Installing uv\n\n```bash\n# Install with curl (macOS/Linux)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Or with pip\npip install uv\n```\n\n### Project Setup\n\n```bash\n# Create a virtual environment\nuv venv\n\n# Install dependencies\nuv pip install -r requirements.txt\n\n# Alternatively, use the pyproject.toml\nuv pip install -e .\n```\n\n### Running the Script\n\n```bash\n# Run the script directly (automatically activates virtual environment)\nuv run hello.py\n\n# Or run with specific parameters\nuv run -- python hello.py\n```\n\n### Adding Dependencies\n\n```bash\n# Add new dependencies\nuv add sentry-sdk\n\n# Or with a specific version\nuv add 'sentry-sdk==1.35.0'\n\n# Create/update requirements.txt\nuv pip compile pyproject.toml -o requirements.txt\n```\n\n## Configuration\n\nThe script is highly configurable through presets or manual configuration. Edit the configuration variables at the top of `hello.py`:\n\n### Using Presets\n\nSet the `PRESET` variable to quickly switch between common testing configurations:\n\n```python\n# Use a preset for quick configuration\nPRESET = \"DIRECT_AM3_CONTINUOUS_UI\"  # Fast UI profile hours for AM3\nMOCK_DURATION_HOURS = 5.0  # Generate 5 hours of profile data\n```\n\nAvailable presets include:\n\n- **AM2 Plan Presets**: `AM2_TRANSACTION_BACKEND`, `AM2_TRANSACTION_UI`, `AM2_CONTINUOUS_BACKEND`, `AM2_CONTINUOUS_UI`\n- **AM3 Plan Presets**: `AM3_TRANSACTION_BACKEND`, `AM3_TRANSACTION_UI`, `AM3_CONTINUOUS_BACKEND`, `AM3_CONTINUOUS_UI`\n- **Fast Generation (AM2)**: `DIRECT_AM2_TRANSACTION_BACKEND`, `DIRECT_AM2_TRANSACTION_UI`, `DIRECT_AM2_CONTINUOUS_BACKEND`, `DIRECT_AM2_CONTINUOUS_UI`\n- **Fast Generation (AM3)**: `DIRECT_AM3_TRANSACTION_BACKEND`, `DIRECT_AM3_TRANSACTION_UI`, `DIRECT_AM3_CONTINUOUS_BACKEND`, `DIRECT_AM3_CONTINUOUS_UI`\n- **Special Modes**: `CUSTOM` (use settings below), `DISABLED` (use manual configuration)\n\n### Manual Configuration\n\nWhen not using presets (`PRESET = \"DISABLED\"`), configure the script manually:\n\n```python\n# Profile type: \"transaction\" or \"continuous\"\nPROFILE_TYPE = \"continuous\"\n\n# Platform: \"python\" (backend) or \"javascript\", \"android\", \"cocoa\" (UI platforms)\nPLATFORM = \"javascript\"\n\n# Fast generation mode\nDIRECT_CHUNK_GENERATION = True\n\n# Hours to simulate\nMOCK_DURATION_HOURS = 10.0\n\n# DSN to use\nSELECTED_DSN = \"profile-hours-am3-business\"\n```\n\n## Understanding Profile Hours Billing\n\nSentry offers different billing models for profiling:\n\n- **AM2 Plans**:\n  - Have separate billing for transaction-based profiling\n  - Have continuous profiling (UI and non-UI) billing\n\n- **AM3 Plans**:\n  - Transaction-based profiling is automatically converted to profile hours\n  - All profiling is billed as profile hours (UI or non-UI depending on platform)\n\n## Key Features\n\n- **Preset System**: Easy switching between common configurations\n- **DSN Selection**: Test against different plan types\n- **Direct Generation**: Generate hours of profile data in seconds\n- **Platform Spoofing**: Test both UI and backend profile hours\n- **Detailed Reporting**: Console output shows exactly what's being tested\n\n## Project Structure\n\n- **hello.py**: Main script for generating profile data\n- **pyproject.toml**: Project dependencies and metadata\n- **CLAUDE.md**: Contains detailed documentation about Sentry profiling architecture\n\n## Advanced Usage\n\nSee `CLAUDE.md` for detailed technical information about Sentry profiling internals, how Relay processes profiles, and the specific strategies used for profile generation.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashed%2Fsentry-profile-hours-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashed%2Fsentry-profile-hours-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashed%2Fsentry-profile-hours-test/lists"}