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

Improve extension telemetry documentation #7471

Open
ntrogh opened this issue Aug 1, 2024 · 2 comments
Open

Improve extension telemetry documentation #7471

ntrogh opened this issue Aug 1, 2024 · 2 comments
Assignees
Labels
doc-enhancement suggested addition or improvement

Comments

@ntrogh
Copy link
Contributor

ntrogh commented Aug 1, 2024

The documentation for adding telemetry to extensions is unclear and incomplete.

Add more descriptive steps about how extension authors can:

  • Capture telemetry for an extension (TelemetryReporter ?)
  • Store telemetry events (@vscode/extension-telemetry ?)

@isidorn FYI

@ntrogh ntrogh added the doc-enhancement suggested addition or improvement label Aug 1, 2024
@ntrogh ntrogh self-assigned this Aug 9, 2024
@urbanfly
Copy link

urbanfly commented Dec 19, 2024

I am confused about the recommended way for extension authors to log and send telemetry data to Application Insights.

@isidorn @lramos15 @ntrogh

In June 2019, the original gettingstarted/telemetry docs were added and instructed users to use the vscode-extension-telemetry npm module.

In May 2022, the docs were moved to extension-guides/telemetry and modified to suggest a renamed NPM module - @vscode/extension-telemetry.

In January 2023, vscode.env.createTelemetryLogger and vscode.TelemetryLogger were committed when the API was finalized and announced in the 1.75 update notes

The @vscode/extension-telemetry NPM module is still recommended by extension-guides/telemetry and frequently updated; 8 patch updates in the last year.

So we now have:

  • TelemetryReporter from @vscode/extension-telemetry which supports sending properties and measurements to Application Insights
  • TelemetryLogger from @types/vscode which only supports sending properties to a TelemetrySender

When should each one be used? Are they meant to work together?


I also cannot see any Output channel for "Telemetry" or "Extension Telemetry" or open a "Telemetry" log file as is mentioned several times in the guides and docs.

Image Image

@lramos15
Copy link
Member

@urbanfly Let me try to answer your questions, thank you for the feedback as it is helpful for clarifying the docs!

  • @vscode/extension-telemetry is the recommended way if using application insights. Under the hood this uses the TelemetryLogger API you mentioned
  • TelemetryLogger is recommended if you are sending to alternative data warehouses as we only provide a package for App insights
  • The telemetry logs will show with either flow and to make them show you must do F1 -> Set Log Level -> Trace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement suggested addition or improvement
Projects
None yet
Development

No branches or pull requests

3 participants