bt observability template pull exports a project’s facets and Loop automations into a portable JSON template. bt observability template push applies a template to a project. Use these commands to store and reuse active observability configuration.
All bt observability subcommands accept the shared bt global flags.
bt observability template pull
Pull facets and Loop automations from a project:bt lets you select the facets and Loop automations to include. It preselects facets connected to a Topics automation and Loop automations that are not paused. With --no-input or --json, the template includes only those resources.
Without --output, the command writes the template to stdout. Use --output - to request stdout explicitly. If the output file already exists, pass --force to replace it.
Pull flags
bt observability template push
Push a template to a project from a local file, a public URL, or stdin:bt displays the number of facets and Loop automations in the template and asks for confirmation before making changes. Pass --yes to skip the prompt.
If a facet, preprocessor, topic map, or Loop automation conflicts with a matching resource in the destination project, the command stops unless you pass --force to replace it.
When applying the template, bt handles related configuration as follows:
- Facets: The template preserves each facet’s relationship with its Topics automation. By default,
btuses the Topics automation named by the template, creating one if needed. If a facet does not name an automation,btuses the destination project’s only Topics automation. The command stops when it cannot infer one because the project has zero or multiple Topics automations. Pass--topics-automation <NAME_OR_ID>to connect every imported facet to one existing Topics automation instead. - Loop automations: Destination settings such as Slack channels and webhooks are not included in the template. When replacing an existing Loop automation,
btpreserves its destination settings. A new Loop automation has no destinations until you configure them in the target project.
Push flags
Template format
An observability template is a JSON object with a schema version, facets, and Loop automations:bt observability template push validates the template before planning changes to the target project.
Next steps
- Learn how facets and Topics classify and group traces.
- Configure Loop automations.