-
Notifications
You must be signed in to change notification settings - Fork 176
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
vsrpc: Add usage telemetry #3453
Conversation
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.
Added a few questions otherwise looks good.
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.
Cool to see this come alive!
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Add usage telemetry for
vsrpc
server invocations.To enable collection of telemetry, the server starts a goroutine that periodically ingests any newly emitted telemetry. On shutdown, any in-memory telemetry events is flushed to disk.
To collect usage telemetry, each server invocation emits a span for the duration of processing. The span contains RPC-specific attributes (ID -- for correlation, response error code, and method). The span also contains any usage attributes that were set throughout the server process lifetime (see
tracing.SetUsageAttribute
which is safe for multithreading). This works nicely with the slight imperfection that specific irrelevant attributes may persist across requests if not updated. We may readjust in the future, but largely attributes do end up being updated since the server currently acts more like an imperfect CLI wrapper after #3381.