You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(telemetry): metrics with missing fields are warned in the logs. (aws#7196)
## Problem
A metric was forwarded from Flare with missing fields. This resulted in
some confusion about why the metric wasn't showing up properly in
Kibana.
## Solution
- refactor validation to check for missingFields and log a warning.
- Ideally, we would throw in CI for these, but there is currently a
significant number of metrics emitted without required fields.
- add tests for this validation.
## Future Work
- Fix existing cases of emitting with missing required fields, so we can
throw in CI when this happens.
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
logOrThrow(`"${metricName}" emitted with result=Failed but without the \`reason\` property.`,true)
345
+
}
346
+
347
+
// TODO: there are many instances in the toolkit where we emit metrics with missing fields. If those can be removed, we can configure this to throw in CI.
348
+
if(metadata.missingFields){
349
+
constlogMsg=`${msgPrefix} "${metricName}" emitted with missing fields: ${metadata.missingFields}`
0 commit comments