You can define a predefined Sentry DSN for your components to use during runtime to report to your Sentry project.
It's also possible for MACH composer to manage the keys (and DSN values) for you. This allows you to generate a unique DSN per component as well as have fine-grained control over rate-limiting.
To let MACH composer manage your DSN values, you need to define an auth token, project and organization.
Create auth token¶
Create a new internal integration and choose Project: Admin as permissions.
The rest can be left empty.
Configure MACH composer¶
Use that token to configure your MACH composer environment:
mach_composer: version: 1 plugins: sentry: source: mach-composer/sentry version: 0.1.3 global: # ... sentry: auth_token: "token" organization: "org" project: "default project" rate_limit_window: 21600 rate_limit_count: 100 sites: - identifier: my-site # ... components: - name: my-component # ... sentry: project: "component project" # override default
Integrate with components¶
sentry is set as a component integration,
the component should have the following Terraform variables defined:
If the integration is set, MACH composer will;
- Generate a new DSN for the component
- Assign the DSN to the
More information on the sentry integration on components