$ account getsentry
Sentry is a full-stack application for error monitoring, performance tracing, session replay, and observability. In production, it ingests events (errors, transactions, logs, replays, profiles) from SDKs via a Relay proxy, processes them through Kafka streams, and stores data in ClickHouse (Snuba) and PostgreSQL. It exposes a REST API (Django REST Framework) and a React frontend for dashboards, issue management, alerts, and AI-powered features (Seer). The architecture is a monolith with hybrid-cloud services: a control silo for global state, cell silos for regional data, and an API gateway. Key entry points include the Relay ingestion endpoint, the Django WSGI/ASGI server, and Celery task workers. External dependencies include PostgreSQL, ClickHouse, Kafka, Redis, and cloud providers (GCP, AWS). The codebase also includes a billing/subscription layer (getsentry) and extensive third-party integrations (Slack, GitHub, Jira, etc.).
This repository is Sentry's self-hosted packaging and operations layer, not the Sentry application itself. It bundles upstream Sentry, Relay, Snuba, Symbolicator, Taskbroker, Vroom, uptime-checker, and launchpad images into a large Docker Compose deployment, and provides idempotent install/upgrade scripts, generated config templates, healthchecks, backup/restore tooling, and optional community patches. The primary entry points are install.sh, which sources a sequence of modular install/ steps, plus operator scripts under scripts/ (reset.sh, backup.sh, restore.sh), sentry-admin.sh for Django admin commands, and a reusable GitHub Action (action.yaml) that downstream Sentry repos use to run self-hosted end-to-end tests against their own images. The runtime architecture is a compose stack: nginx terminates HTTP and routes ingestion to Relay, which validates and buffers events before writing to Kafka; Snuba consumer containers move data from Kafka into ClickHouse; Sentry web and consumer containers read from Kafka/Postgres/Redis and the SeaweedFS S3-compatible object store; Symbolicator handles native symbolication; Taskbroker routes async tasks. The compose file supports an errors-only profile that dramatically reduces the service count and a feature-complete profile that enables transactions, metrics, replays, profiling, uptime, logs, and mobile builds. The codebase is notably well-tested for an infrastructure repo, with bash unit tests under _unit-test/ and pytest integration tests under _integration-test/ that install the full stack and verify event ingestion end to end. Maintenance is active and dependency drift is low: images are bumped regularly via Dependabot, shell scripts are linted with ShellCheck and formatted with shfmt, there is a pre-commit pipeline, and the repo tracks recent upstream replacements such as Valkey for Redis, pgbouncer, taskbroker, and ClickHouse upgrades. The main limitation for reuse is that most of the repository is configuration and deployment glue tied to this specific stack; the few genuinely self-contained, extractable components are small utilities around healthchecks, cryptography/migration, and cron containers.
This is the official Sentry JavaScript SDK monorepo, providing error monitoring, performance tracing, session replay, user feedback, and profiling for a wide range of JavaScript runtimes and frameworks. The architecture is a large monorepo with ~50 packages, each targeting specific platforms (browser, Node.js, Cloudflare Workers, Deno, Bun) and frameworks (Next.js, Angular, React, SvelteKit, Nuxt, etc.). The core SDK logic lives in `packages/core`, with platform-specific packages that integrate via a consistent `Sentry.init()` entry point. Data flows from the user's application through instrumented APIs (error handlers, fetch, timers, etc.) to produce events (errors, spans, breadcrumbs, replay recordings) that are serialized into envelopes and sent to Sentry's ingest endpoint via configurable transports. The monorepo also includes bundler plugins for build-time instrumentation (source map upload, debug ID injection, component annotation) and extensive integration tests covering multiple bundler versions and framework releases. The codebase exhibits high craftsmanship with well-defined integration patterns (`defineIntegration`), modular utilities, and comprehensive test infrastructure. It is actively maintained with frequent commits and a broad compatibility surface, though the sheer number of framework-specific packages introduces some maintenance complexity.
This is the official Sentry SDK for PHP (sentry-php), a client library that instruments PHP applications for error tracking, exception capture, performance monitoring (tracing, logging, metrics, profiling, and check-ins). The architecture follows a hub-scope pattern: a global SentrySdk facade manages a stack of Hub instances, each holding a Client and Scope. The Client handles event creation, before-send callbacks, sampling, and integration setup. Events are serialized into Sentry envelope format and transmitted via an HTTP transport (cURL) or a local agent socket. The library ships with numerous integrations for PHP frameworks (Monolog, Guzzle, OpenTelemetry, Symfony, Laravel), a custom Options resolver, serializers, aggregation buffers for metrics and logs, and runtime context isolation for long-lived workers (FrankenPHP, RoadRunner). External dependencies include Monolog, PSR-7, OpenTelemetry API, and the Excimer extension for profiling. The SDK is highly configurable via the Options class and supports extensive event enrichment through scopes and event processors.
The sentry-ruby repository is the official SDK for Ruby, designed for error tracking, performance monitoring, and distributed tracing. It functions as an instrumentation layer that captures exceptions, transactions, logs, and metrics from Ruby applications and transmits them to the Sentry backend. The architecture follows a Hub/Scope/Client pattern, ensuring thread and fiber isolation for context management across concurrent requests. It supports a wide range of integrations including Rails, Sidekiq, Resque, and OpenTelemetry, making it a central piece of observability infrastructure for the Ruby ecosystem. The SDK manages the full lifecycle of telemetry data, from capture to transport. It implements sophisticated sampling logic to maintain consistent sampling rates across distributed services using deterministic algorithms. The transport layer handles rate limiting, compression, and envelope serialization, ensuring efficient communication with the Sentry server. The codebase is structured as a monorepo with a core gem (sentry-ruby) and modular integrations (sentry-rails, sentry-sidekiq, etc.), allowing for targeted updates and version compatibility testing across multiple Ruby and framework versions. Data flows from the application through the SDK's Scope and Client, where events are processed, sampled, and buffered before being sent via HTTP or Spotlight. The system supports structured logging and metrics collection, adhering to the Sentry Logs Protocol. It includes robust testing infrastructure with matrix testing across Ruby versions (2.7-4.0) and framework versions (Rails 5.2-8.1.3), ensuring stability and compatibility. The SDK is actively maintained with recent commits and issue triage, reflecting its critical role in production environments.
This is a Go-based Kubernetes agent that watches cluster events (Kubernetes Event objects and Pod status changes) and sends them to Sentry for error tracking and monitoring. It runs as a read-only sidecar inside a Kubernetes cluster, using client-go informers and watchers to observe Jobs, CronJobs, Deployments, ReplicaSets, Events, and Pods. When a warning or error event occurs, the agent enriches it with Kubernetes metadata (owner references, node names, namespace) and captures it as a Sentry error event. It also supports Sentry Crons monitoring for CronJobs, custom DSN per resource via annotations, GKE integration for cluster metadata, and client-side filtering by event reason or source. The architecture is cleanly separated into watchers, enhancers, filters, and backoff logic, with comprehensive unit tests and CI/CD pipelines.
This is a GitHub Action that automates creating releases in Sentry (error monitoring platform). The action wraps the `@sentry/cli` tool and runs as either a Docker container on Linux runners or a composite action installing the CLI on macOS/Windows. Its core workflow (in `src/main.ts`) parses inputs, validates environment variables, then orchestrates a sequence of sentry-cli calls: creating a release, optionally setting commits (auto/skip/manual), injecting debug IDs into source files, uploading source maps, deploying to an environment, and finalizing the release. Telemetry via `@sentry/node` is collected to monitor action performance. The codebase is small (5 source files plus tests), cleanly structured, and well-tested with both unit tests and end-to-end integration tests against Sentry's API. It is actively maintained with recent dependency bumps and proper CI/CD pipelines.
rb is a Python library for interacting with multiple Redis nodes, providing automatic routing of commands based on keys and broadcasting capabilities. It uses a cluster abstraction to manage connections to individual Redis instances, with routers (partition or consistent hashing) to determine the correct node for key-based operations. The library features a promise-based model for parallel execution, allowing non-blocking I/O via multiplexing (poll/epoll/kqueue) to handle multiple Redis connections efficiently. Key features include automatic batching of compatible commands (e.g., merging multiple GETs into MGET), fault tolerance through reconnection logic, and support for both routed and fanout operations. The codebase is well-structured with clear separation of concerns between cluster management, routing, client interfaces, and utility components.