-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: update metric naming spec #984
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,20 @@ _types_ is an array that holds telemetry metadata types. This is the information | |
|
||
### Metrics | ||
|
||
_metrics_ is an array that contains the actual metrics posted to the service. `name` defines the metric name what is | ||
posted to the service, `metadata` contains data from `types` that define characteristics of the telemetry beyond | ||
`createTime` and a `value`. `name` must be in the format`namespace_camelCaseName` (e.g. `s3_uploadObject`). The field is optional. | ||
_metrics_ is an array that contains the actual metrics posted to the service. | ||
- `name` defines the metric name | ||
- it must be in the format `namespace_camelCaseName` (e.g. `s3_objectUpload`). | ||
- it must be in the format `{namespace}_{noun}{Verb}` (eg: `toolkit_moduleInit`) | ||
- This format enables a natural grouping of related metrics in our definitions file, as well as improved searchability. | ||
- Common Namespaces: | ||
- `toolkit_` is for general non-feature-specific metrics created by the toolkit. Eg: `toolkit_moduleOpen` | ||
- `ide_` is for IDE specific metrics, not controlled by our extension. Eg: `ide_editorOpen` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we also add an entry for ui_click? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do you mean specifically? IIUC we semi-agreed in a previous slack thread that with this new spec, |
||
- NOTE: legacy metrics don't always follow the above rules, but new definitions must follow them. | ||
- `description` explains what the metric means | ||
- put effort to explaining the metrics purpose in detail. This tends to be the source of truth for what the metric actually means and how it should be used. | ||
- if a metric is deprecated, it must be indicated here | ||
- `metadata` contains fields (`types`) that define characteristics of the telemetry beyond `createTime` and a `value`. | ||
- This field is optional, but default fields (`types`) are always present on generated metrics. | ||
|
||
``` | ||
"metrics": [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some indented points explaining the rationale? As reviewers we will want to be able to link to this section of the doc to avoid repetition and pushback.