Skip to content
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

Use telemetry wrapper to unify BI format. #417

Merged
merged 4 commits into from
Sep 14, 2018
Merged

Conversation

Eskibear
Copy link
Member

@Eskibear Eskibear commented Sep 10, 2018

Changes

  • Instrument initializeExtension where code for activation is located.

  • Use a helper function instrumentAndRegisterCommand to register VSCode commands.

  • Manually instrument provideDebugConfigurations and resolveDebugConfiguration as they are top-level operations in this extension.

Telemetry data entry

  • activation
{
  "eventName": "opStart",
  "dimensions": {
    "operationId": "6e851600-9391-41cc-98e2-f2da99b9cb66",
    "operationName": "activation",
    "common.os": "win32",
    "common.platformversion": "10.0.17134",
    "common.extname": "vscjava.vscode-java-debug",
    "common.extversion": "0.12.2",
    "common.vscodemachineid": "someValue.machineId",
    "common.vscodesessionid": "someValue.sessionId",
    "common.vscodeversion": "1.27.1"
  },
  "measurements": {}
}

{
  "eventName": "opEnd",
  "dimensions": {
    "operationId": "6e851600-9391-41cc-98e2-f2da99b9cb66",
    "operationName": "activation",
    "common.os": "win32",
    "common.platformversion": "10.0.17134",
    "common.extname": "vscjava.vscode-java-debug",
    "common.extversion": "0.12.2",
    "common.vscodemachineid": "someValue.machineId",
    "common.vscodesessionid": "someValue.sessionId",
    "common.vscodeversion": "1.27.1"
  },
  "measurements": {
    "duration": 3
  }
}
  • provideDebugConfigurations
{
  "eventName": "opStart",
  "dimensions": {
    "operationId": "ef657d49-3b1b-4367-9f0b-72a693610cd5",
    "operationName": "provideDebugConfigurations",
    "common.os": "win32",
    "common.platformversion": "10.0.17134",
    "common.extname": "vscjava.vscode-java-debug",
    "common.extversion": "0.12.2",
    "common.vscodemachineid": "someValue.machineId",
    "common.vscodesessionid": "someValue.sessionId",
    "common.vscodeversion": "1.27.1"
  },
  "measurements": {}
}

{
  "eventName": "opEnd",
  "dimensions": {
    "operationId": "ef657d49-3b1b-4367-9f0b-72a693610cd5",
    "operationName": "provideDebugConfigurations",
    "common.os": "win32",
    "common.platformversion": "10.0.17134",
    "common.extname": "vscjava.vscode-java-debug",
    "common.extversion": "0.12.2",
    "common.vscodemachineid": "someValue.machineId",
    "common.vscodesessionid": "someValue.sessionId",
    "common.vscodeversion": "1.27.1"
  },
  "measurements": {
    "duration": 7138
  }
}
  • resolveDebugConfiguration
{
  "eventName": "opStart",
  "dimensions": {
    "operationId": "17d01ade-2040-4e5d-bb36-04cab7a84b81",
    "operationName": "resolveDebugConfiguration",
    "common.os": "win32",
    "common.platformversion": "10.0.17134",
    "common.extname": "vscjava.vscode-java-debug",
    "common.extversion": "0.12.2",
    "common.vscodemachineid": "someValue.machineId",
    "common.vscodesessionid": "someValue.sessionId",
    "common.vscodeversion": "1.27.1"
  },
  "measurements": {}
}

{
  "eventName": "opEnd",
  "dimensions": {
    "operationId": "17d01ade-2040-4e5d-bb36-04cab7a84b81",
    "operationName": "resolveDebugConfiguration",
    "common.os": "win32",
    "common.platformversion": "10.0.17134",
    "common.extname": "vscjava.vscode-java-debug",
    "common.extversion": "0.12.2",
    "common.vscodemachineid": "someValue.machineId",
    "common.vscodesessionid": "someValue.sessionId",
    "common.vscodeversion": "1.27.1"
  },
  "measurements": {
    "duration": 30
  }
}
  • SpecifyProgramArgs
{
  "eventName": "opStart",
  "dimensions": {
    "operationId": "39003f29-14bc-4c56-a428-2397d616fb7f",
    "operationName": "JavaDebug.SpecifyProgramArgs",
    "common.os": "win32",
    "common.platformversion": "10.0.17134",
    "common.extname": "vscjava.vscode-java-debug",
    "common.extversion": "0.12.2",
    "common.vscodemachineid": "someValue.machineId",
    "common.vscodesessionid": "someValue.sessionId",
    "common.vscodeversion": "1.27.1"
  },
  "measurements": {}
}

{
  "eventName": "opEnd",
  "dimensions": {
    "operationId": "39003f29-14bc-4c56-a428-2397d616fb7f",
    "operationName": "JavaDebug.SpecifyProgramArgs",
    "common.os": "win32",
    "common.platformversion": "10.0.17134",
    "common.extname": "vscjava.vscode-java-debug",
    "common.extversion": "0.12.2",
    "common.vscodemachineid": "someValue.machineId",
    "common.vscodesessionid": "someValue.sessionId",
    "common.vscodeversion": "1.27.1"
  },
  "measurements": {
    "duration": 3435
  }
}

src/commands.ts Outdated
const duration = Date.now() - startAt;
sendOperationEnd(operationId, delegateCommand, duration, error);
}

// TODO: need to handle error and trace telemetry
Copy link
Contributor

Choose a reason for hiding this comment

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

remove todo

@Eskibear
Copy link
Member Author

Eskibear commented Sep 11, 2018

UPDATE:
This PR focus on opStart/opEnd/error. Will send step in future after related API implemented in wrapper. 

@Eskibear Eskibear changed the title Use telemetry wrapper to unify BI format. [WIP] Use telemetry wrapper to unify BI format. Sep 11, 2018
@Eskibear Eskibear changed the title [WIP] Use telemetry wrapper to unify BI format. Use telemetry wrapper to unify BI format. Sep 13, 2018
@testforstephen testforstephen mentioned this pull request Sep 13, 2018
15 tasks
src/extension.ts Outdated
await instrumentOperation("activation", initializeExtension)(context);
}

export function initializeExtension(operationId: string, context: vscode.ExtensionContext) {
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to export.

@Eskibear Eskibear merged commit f191fbd into microsoft:master Sep 14, 2018
@Eskibear Eskibear deleted the new-bi branch September 14, 2018 08:37
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.

4 participants