microsoft / vscode-extension-telemetry

Node module to help VS Code extensions send telemetry using application insights
https://www.npmjs.com/package/@vscode/extension-telemetry
Other
125 stars 46 forks source link

User and Session info not being sent to Azure Application Insights #197

Closed vedant1811 closed 7 months ago

vedant1811 commented 7 months ago

Hello team,

I see all the events (names, properties) in the Azure Application Insights dashboard. But for some reason I only have 1 user, and 1 session (for thousands of events).

I'm not sure if this is a bug in my implementation or in this package.

I have the standard setup for this package:

let reporter: TelemetryReporter
reporter = new TelemetryReporter('<KEY>') 
extContext.subscriptions.push(reporter)
...
reporter.sendTelemetryEvent(name, properties)

Version: 0.9.1

lramos15 commented 7 months ago

I don't believe we do anything special here, but can you not use common.vscodemachineid and common.vscodesessionid to correlate your users?

vedant1811 commented 7 months ago

Yes, I'm doing that. But it becomes quite cumbersome to use for anything besides looking at events.

Also, application insight features like user flows, funnels don't work.

vedant1811 commented 7 months ago

As per the ApplicationInsights-JS setup page, the following functions need to be called:

appInsights.loadAppInsights();
appInsights.trackPageView(); // Manually call trackPageView to establish the current user/session/pageview

Are there any plans of supporting users and sessions?

lramos15 commented 7 months ago

I don't think there is any plans to adopt this as there are PII implications to this approach and we try to take a privacy focused approach to things. I recommend using the TelemetryLogger API inside vscode directly for more advanced use cases.

mcgordonite commented 4 months ago

We updated vscode-extension-telemetry from 0.8.5 to 0.9.6 recently. On 0.8.5, events from the library included the user_Id propery, so we could use the Users features of Application Insights. Since the update, events do not include user_Id.

Is this the same issue?

FiB3 commented 3 months ago

We updated vscode-extension-telemetry from 0.8.5 to 0.9.6 recently. On 0.8.5, events from the library included the user_Id propery, so we could use the Users features of Application Insights. Since the update, events do not include user_Id.

Is this the same issue?

@mcgordonite, I guess it's the same issue. What would be the reason not to include the user/session info, please?