Skip to content

Commit e85aa7d

Browse files
doc: update metric naming spec
See changes for the new spec when it comes to metric naming. - This will NOT retroactively apply to all existing metrics since this will require significant work refactoring that we do not want to do at the moment. Signed-off-by: nkomonen-amazon <[email protected]>
1 parent 1c6c863 commit e85aa7d

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

telemetry/telemetryformat.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,20 @@ _types_ is an array that holds telemetry metadata types. This is the information
2626

2727
### Metrics
2828

29-
_metrics_ is an array that contains the actual metrics posted to the service. `name` defines the metric name what is
30-
posted to the service, `metadata` contains data from `types` that define characteristics of the telemetry beyond
31-
`createTime` and a `value`. `name` must be in the format`namespace_camelCaseName` (e.g. `s3_uploadObject`). The field is optional.
29+
_metrics_ is an array that contains the actual metrics posted to the service.
30+
- `name` defines the metric name
31+
- it must be in the format `namespace_camelCaseName` (e.g. `s3_objectUpload`).
32+
- it must be in the format `{namespace}_{noun}{Verb}` (eg: `toolkit_moduleInit`)
33+
- Common Namespaces:
34+
- `toolkit_` is for general non-feature-specific metrics created by the toolkit. Eg: `toolkit_moduleOpen`
35+
- `ide_` is for IDE specific metrics, not controlled by our extension. Eg: `ide_editorOpen`
36+
- NOTE: due to legacy reasons the above spec may not be followed, but all future definitions must follow it.
37+
- `description` explains what the metric means
38+
- put effort to explaining the metrics purpose in detail. This tends to be the source of truth for
39+
what the metric actually means and how it should be used.
40+
- `metadata` contains data from `types` that define characteristics of the telemetry beyond
41+
`createTime` and a `value`.
42+
- This field is optional, but default `types` are automatically added regardless.
3243

3344
```
3445
"metrics": [

0 commit comments

Comments
 (0)