Skip to content

Commit a62d477

Browse files
refactor: rename existing toolkit module metric names to new format (#985)
## Problem: We have a new telemetry metric name format defined in our telemetry readme. The current module metrics do not follow this spec. ## Solution: - Rename the existing metrics to match #984 spec. Eg: `toolkit_openModule` -> `toolkit_willOpenModule` - Reorder the renamed metric alphabetically - Note we are not doing this for everything, but for some select metrics. <!--- REMINDER: - Read CONTRIBUTING.md first. - Add test coverage for your changes. - Link to related issues/commits. - Testing: how did you test your changes? - Screenshots if applicable --> ## License By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Signed-off-by: nkomonen-amazon <[email protected]>
1 parent e380173 commit a62d477

File tree

1 file changed

+48
-48
lines changed

1 file changed

+48
-48
lines changed

telemetry/definitions/commonDefinitions.json

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7124,8 +7124,8 @@
71247124
]
71257125
},
71267126
{
7127-
"name": "toolkit_closeModule",
7128-
"description": "The user closed 'something' (specified by 'module'). Examples: a view, feature, resource, ...",
7127+
"name": "toolkit_didCloseModule",
7128+
"description": "The module has closed/terminated. Use this when the module is done being used.",
71297129
"metadata": [
71307130
{
71317131
"type": "module",
@@ -7134,6 +7134,33 @@
71347134
],
71357135
"passive": true
71367136
},
7137+
{
7138+
"name": "toolkit_didLoadModule",
7139+
"description": "The module has loaded, i.e it has rendered/resolved/finished. Use this after `toolkit_willOpenModule` to indicate success.",
7140+
"metadata": [
7141+
{
7142+
"type": "attempts",
7143+
"required": false
7144+
},
7145+
{
7146+
"type": "duration",
7147+
"required": false
7148+
},
7149+
{
7150+
"type": "module",
7151+
"required": true
7152+
},
7153+
{
7154+
"type": "result",
7155+
"required": true
7156+
},
7157+
{
7158+
"type": "version",
7159+
"required": false
7160+
}
7161+
],
7162+
"passive": true
7163+
},
71377164
{
71387165
"name": "toolkit_featureState",
71397166
"description": "Represents the current enabled state of a feature. Used to track user journey through a feature. Emitted after feature-specific operations of interest in the Toolkit.",
@@ -7199,33 +7226,6 @@
71997226
],
72007227
"passive": true
72017228
},
7202-
{
7203-
"name": "toolkit_initModule",
7204-
"description": "The Toolkit has completed initialization for the specified module.",
7205-
"metadata": [
7206-
{
7207-
"type": "attempts",
7208-
"required": false
7209-
},
7210-
{
7211-
"type": "duration",
7212-
"required": false
7213-
},
7214-
{
7215-
"type": "module",
7216-
"required": true
7217-
},
7218-
{
7219-
"type": "result",
7220-
"required": true
7221-
},
7222-
{
7223-
"type": "version",
7224-
"required": false
7225-
}
7226-
],
7227-
"passive": true
7228-
},
72297229
{
72307230
"name": "toolkit_invokeAction",
72317231
"description": "User invoked an action. `source` is the notification that produced the action",
@@ -7256,25 +7256,6 @@
72567256
}
72577257
]
72587258
},
7259-
{
7260-
"name": "toolkit_openModule",
7261-
"description": "User opened 'something' (specified by 'module'). Examples: a view, feature, resource, ...",
7262-
"metadata": [
7263-
{
7264-
"type": "module",
7265-
"required": true
7266-
},
7267-
{
7268-
"type": "result",
7269-
"required": true
7270-
},
7271-
{
7272-
"type": "source",
7273-
"required": true
7274-
}
7275-
],
7276-
"passive": true
7277-
},
72787259
{
72797260
"name": "toolkit_showAction",
72807261
"description": "Toolkit presented an action. `source` is the notification that produced the action. See also `toolkit_showNotification`.",
@@ -7355,6 +7336,25 @@
73557336
"name": "toolkit_viewLogs",
73567337
"description": "View logs for the toolkit"
73577338
},
7339+
{
7340+
"name": "toolkit_willOpenModule",
7341+
"description": "The opening of a module **started**. This does not imply it successfully finished, use `toolkit_didLoadModule` for that. The open/load separation exists because it may be difficult to capture then entire process in a single metric. A 'module' is a general term that represents things like: a view, feature, resource, ... ",
7342+
"metadata": [
7343+
{
7344+
"type": "module",
7345+
"required": true
7346+
},
7347+
{
7348+
"type": "result",
7349+
"required": true
7350+
},
7351+
{
7352+
"type": "source",
7353+
"required": true
7354+
}
7355+
],
7356+
"passive": true
7357+
},
73587358
{
73597359
"name": "ui_click",
73607360
"description": "User clicked/activated a UI element. This does not necessarily have to be an explicit mouse click. Any user action that has the same behavior as a mouse click can use this event.",

0 commit comments

Comments
 (0)