Skip to content

Conversation

@Dexterp37
Copy link
Contributor

Without this fix products using these types silently fail ping submission with the following error:

Error executing task: Error: Unable to create metric of unknown type labeled_boolean
    at createMetric (file:///mnt/d/Mozilla/rally/core-addon/node_modules/@mozilla/glean/dist/webext/core/metrics/utils.js:17:15)
    at createMetricsPayload (file:///mnt/d/Mozilla/rally/core-addon/node_modules/@mozilla/glean/dist/webext/core/metrics/database.js:30:28)
    at MetricsDatabase.getPingMetrics (file:///mnt/d/Mozilla/rally/core-addon/node_modules/@mozilla/glean/dist/webext/core/metrics/database.js:153:20)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async collectPing (file:///mnt/d/Mozilla/rally/core-addon/node_modules/@mozilla/glean/dist/webext/core/pings/maker.js:98:25)
    at async collectAndStorePing (file:///mnt/d/Mozilla/rally/core-addon/node_modules/@mozilla/glean/dist/webext/core/pings/maker.js:122:30)
    at async file:///mnt/d/Mozilla/rally/core-addon/node_modules/@mozilla/glean/dist/webext/core/pings/ping_type.js:32:13
    at async Dispatcher.executeTask (file:///mnt/d/Mozilla/rally/core-addon/node_modules/@mozilla/glean/dist/webext/core/dispatcher.js:46:13)
    at async Dispatcher.execute (file:///mnt/d/Mozilla/rally/core-addon/node_modules/@mozilla/glean/dist/webext/core/dispatcher.js:66:21)

Otherwise the output would exclusively be printed
on errors, making debugging harder.
This additionally adds test coverage.
@Dexterp37 Dexterp37 requested a review from brizental April 20, 2021 10:31
@Dexterp37 Dexterp37 self-assigned this Apr 20, 2021
Copy link
Contributor

@brizental brizental left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+wc. I missed this step in our "Adding a new metric" guide. Would you mind including it? Follow up is fine too.

@Dexterp37
Copy link
Contributor Author

r+wc. I missed this step in our "Adding a new metric" guide. Would you mind including it? Follow up is fine too.

I think we have that, but I just missed it last time

@Dexterp37 Dexterp37 merged commit e97ba46 into mozilla:main Apr 20, 2021
@Dexterp37 Dexterp37 deleted the fix_labeled branch April 20, 2021 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants