getsentry/seer) to integrate sentry-options.
Prerequisites
Before starting, ensure you understand:- Your service’s namespace naming (must be
{repo}or{repo}-*) - The options your service needs and their types
- Your service’s Docker build process
Setup steps
Create your schema
Create a schema definition at See schema definition for complete format details and supported types.
sentry-options/schemas/{namespace}/schema.json in your service repository.Namespace naming rules:- Must be either
{repo}(exact match) or{repo}-*(prefixed) - For example, in the
seerrepo:seer,seer-autofix,seer-groupingare valid autofixalone is not valid
sentry-options/schemas/seer/schema.json
Update Dockerfile
Schemas must be baked into your Docker image so the client library can validate values and provide defaults even before any ConfigMap is deployed.The schemas are read-only and embedded at build time. Values are mounted separately at runtime via ConfigMap.
Dockerfile
Add client library dependency
Add the sentry-options client library to your project dependencies.
- Python
- Rust
pyproject.toml
Add schema validation to CI
Create a GitHub Actions workflow to validate schema changes and enforce evolution rules.This workflow will:
.github/workflows/validate-sentry-options.yml
Replace
@sha with a specific commit SHA from the sentry-options repository for reproducibility.- Validate schema JSON syntax and structure
- Enforce schema evolution rules (no type changes, no removing options, etc.)
- Check if deleted options are still in use in sentry-options-automator
Initialize and use in code
Initialize the library early in your application startup, then access options by namespace.See using clients for complete usage examples.
- Python
- Rust
What happens after setup
Once you’ve completed these steps in your service repository:- Your service runs with defaults: The library uses schema defaults when no ConfigMap exists yet
- CI validates schema changes: Any PR modifying schemas will be validated automatically
- You can test locally: Create a
values.jsonfile to test different option values (see local testing)
Next steps
Define schemas
Learn about supported types, requirements, and evolution rules
Register in automator
Add your service to sentry-options-automator to deploy values
Deployment order
The typical integration flow:- Service repo: Add schema, update Dockerfile, use client library → Deploy
- Automator repo: Register service, add values → CI/CD deploys ConfigMaps
- Ops repo: Add pod annotations → ConfigMaps auto-mounted