Skip to content

Add msgo/module telemetry counters#2283

Draft
gdams wants to merge 2 commits into
microsoft/mainfrom
dev/gadams/telemetry
Draft

Add msgo/module telemetry counters#2283
gdams wants to merge 2 commits into
microsoft/mainfrom
dev/gadams/telemetry

Conversation

@gdams
Copy link
Copy Markdown
Member

@gdams gdams commented May 18, 2026

Summary

Add a SHA-256 hash of the Go module path as a custom property on the go/invocations telemetry event, and vendor the updated go-infra/telemetry dependency (which includes support for counter properties and property filtering).

fixes: https://github.com/microsoft/go-lab/issues/382

New telemetry

msgo/module/hash property on go/invocations

When go/invocations is recorded, the nearest go.mod file is located and the module path is hashed using SHA-256. The resulting hash is sent as a custom property (msgo/module/hash) on the go/invocations event. This is a one-way hash — the original module path cannot be recovered from it.

The hash is only sent when a go.mod file is found. If no go.mod is present, go/invocations is sent without the property.

Dependency changes

  • Updated vendored github.com/microsoft/go-infra/telemetry to include support for NewWithProperties(), PropertyFilter, and counter property configuration in config.json.

Patch changes

  • Patch 0001 (Vendor external dependencies): Updated go-infra/telemetry dependency version with property support.
  • Patch 0009 (Add appinsights telemetry): Added module hash computation and NewWithProperties call in Inc().

Documentation

  • Updated eng/doc/Telemetry.md to document the new msgo/module/hash property and clarify that module names are not collected (only hashes).

Copilot AI review requested due to automatic review settings May 18, 2026 13:56
@gdams gdams requested a review from a team as a code owner May 18, 2026 13:56
@gdams gdams changed the title Add msgo/module, msgo/ci, and msgo/systemcrypto telemetry counters Add msgo/module and msgo/ci telemetry counters May 18, 2026
@gdams gdams force-pushed the dev/gadams/telemetry branch from 157fe41 to b3ed91d Compare May 18, 2026 14:03

This comment was marked as outdated.

Comment thread patches/0009-Add-appinsights-telemetry.patch Outdated
Copy link
Copy Markdown
Member

@dagood dagood left a comment

Choose a reason for hiding this comment

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

@karianna
Copy link
Copy Markdown
Member

@gdams - needs a rebase

@gdams
Copy link
Copy Markdown
Member Author

gdams commented May 26, 2026

cherry-picking the CI counter out into #2314

@gdams gdams changed the title Add msgo/module and msgo/ci telemetry counters Add msgo/module telemetry counters May 26, 2026
@gdams gdams force-pushed the dev/gadams/telemetry branch from 871c54f to ba2d84a Compare May 26, 2026 16:43
@gdams gdams marked this pull request as draft May 26, 2026 16:43
@gdams gdams requested a review from Copilot May 26, 2026 16:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 4

Comment thread patches/0009-Add-appinsights-telemetry.patch Outdated
Comment thread patches/0009-Add-appinsights-telemetry.patch Outdated
Comment thread patches/0001-Vendor-external-dependencies.patch
Comment thread eng/doc/Telemetry.md
@gdams gdams force-pushed the dev/gadams/telemetry branch from ba2d84a to af45c99 Compare May 26, 2026 16:59
Comment thread patches/0009-Add-appinsights-telemetry.patch Outdated
Comment thread patches/0009-Add-appinsights-telemetry.patch Outdated
Comment thread patches/0009-Add-appinsights-telemetry.patch Outdated
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.

5 participants