Skip to content

Define telemetry data points #363

@testforstephen

Description

@testforstephen

In order to better manage the telemetry info, we should form a standard about the telemetry data points.
Below is a draft.

Telemetry Type:

  • usage
  • error
  • info

Telemetry entries:

  • UsageData
    We divide the extension features into operation unit, and the usage data is based on operation.

Below is the code structure to wrap the telemetry workflow:

try {
  telemetry.start(opId, opName);
  ...execute the operation
  ...
} catch (ex) {
  telemetry.error(ex);
} finally {
  telemetry.end(opId, opName, ex, duration);
}

Below is the telemetry schema:

{
"name": "vscjava.vscode-java-debug/opStart",
"customDimensions": {
   "opId": "<UUID>",
   "opName": "<opName>",
 }
}
{
 "name": "vscjava.vscode-java-debug/opEnd",
 "customDimensions": {
    "opId": "<UUID>",
    "opName": "<opName>",
    "errorMessage": "<message>", // null if it's a success
    "errorCode": 1, // 0 indicates it's a success
    "stackTrace": <>
  },
 "customMeasurements": {
     "duration": 23 // operationFinishTimestamp - operationStartTimestamp, in milliseconds
  }
}

The typical operation units:
(1) we can take the activate extension as an operation, then the opName is activate.
(2) we can take vscode command from vscode.commands.registerCommand as an operation, then the opName is

  • Error
{
  "name": "vscjava.vscode-java-debug/error",
  "customDimensions": {
      "errorMessage": "<message>", // null if it's a success
      "errorCode": 1, // 0 indicates it's a success
      "stackTrace": <>
  }
}
  • Info
    per extension, log the corresponding diagnostics info.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions