Schema structure
Every schema must be a valid JSON file located atsentry-options/schemas/{namespace}/schema.json.
Required fields
schema.json
| Field | Required | Description |
|---|---|---|
version | Yes | Semver string (e.g., "1.0") |
type | Yes | Must be "object" |
properties | Yes | Map of option definitions |
Property fields
Each property inproperties defines a single option:
| Field | Required | Description |
|---|---|---|
type | Yes | One of: string, integer, number, boolean, array |
default | Yes | Default value (must match declared type) |
description | Yes | Human-readable description |
items | For arrays | Object specifying array element type |
Supported types
Primitive types
Array types
Arrays require anitems field specifying the element type:
Supported array element types:
string, integer, number, boolean. Nested arrays and objects are not yet supported.Type validation
The system enforces strict type validation:Number handling
- Schema says
integer→ Rejects5.5, accepts5 - Schema says
number→ Accepts both5and5.5
Strict validation rules
Example error scenarios:values.yaml (❌ Will fail)
Complete example
Here’s a real-world schema from the test suite:sentry-options/schemas/sentry-options-testing/schema.json
Schema evolution rules
CI automatically enforces these rules when you modify schemas:| Change | Allowed | Rationale |
|---|---|---|
| Add new options | ✅ | Backward compatible (clients use defaults) |
| Add new namespaces | ✅ | Backward compatible (isolated) |
| Remove options | ❌ | Breaking change (services may depend on it) |
| Remove namespaces | ❌ | Breaking change (services may depend on it) |
| Change option types | ❌ | Breaking change (client code expects specific type) |
| Change default values | ❌ | Behavior change (could break existing logic) |
Removing options safely
When you need to remove an option:- Remove all code using the option from your service
- Remove the option from values files in
sentry-options-automator - Create a PR to remove the option from your schema
- The CI will verify the option is not used anywhere
Changing defaults
To change a default value:- Add the desired value to all targets in
sentry-options-automator - Deploy the ConfigMaps
- Now all instances use the new value (overriding the old default)
- The schema default becomes irrelevant
Additional properties
The system automatically injects"additionalProperties": false to reject unknown options in values files. This helps catch typos early.
Namespace naming
Namespace directories must follow the naming convention
{repo} or {repo}-*.seer repository:
✅ Valid namespaces:
seerseer-autofixseer-grouping
autofix(missing repo prefix)getsentry-seer(wrong repo prefix)
Next steps
Use in code
Learn how to read options in Python and Rust
Test locally
Override values during development