Azure / Azure/azure-dev

Local preflight: collect telemetry when bicep snapshot fails to identify affected templates

Open
#8,172 0 comments 0 reactions 0 assignees View on GitHub
area/telemetry enhancement
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

## Problem

When `bicep snapshot` fails during local preflight, the failure is logged at debug level and all checks are skipped. There is currently no telemetry emitted for this failure case, making it impossible to:

1. Know how many users/templates are affected by snapshot failures
2. Identify which error patterns are most common
3. Track whether upstream fixes (e.g., [Azure/bicep#18822](https://github.com/Azure/bicep/issues/18822)) reduce the failure rate over time

## Proposed Solution

- Emit a telemetry event when `bicep snapshot` fails during preflight
- Include the error category/pattern (not the full error, to avoid PII) — e.g., `TemplateValidationException`, `non-null assertion failure`, `snapshot not supported`
- Include the Bicep CLI version being used
- Track the telemetry over time to measure improvement as upstream fixes land

## Related

- Upstream: [Azure/bicep#18822](https://github.com/Azure/bicep/issues/18822)
- Investigation: #7986
- User warning: #8171

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.