Skip to content

Telemetry name gen - #143

Merged
kieronlanning merged 6 commits into
mainfrom
telemetry-name-gen
Oct 7, 2026
Merged

kieronlanning merged 6 commits into
mainfrom
telemetry-name-gen

Conversation

@kieronlanning

Copy link
Copy Markdown
Contributor

No description provided.

SampleApp.Shared now owns both the telemetry and the behaviour that emits
it: WeatherForecastValidator uses IWeatherForecastTelemetry, and the
library registers its own services via AddWeatherForecastValidation().
WeatherService routes forecasts through the validator, so the shared
library's activity source and meter are genuinely emitted rather than
only generated.

Both names default to the assembly name, so SampleApp.Shared is easy to
spot in each host's aggregated TelemetryNames, which previously carried
the less obvious sample-shared-library source name and no meter at all.
CA1515 was suppressed through NoWarn, which Purview.BuildSdk 1.0.3
rejects as a policy violation (PRSGD0008), so the solution could not
build without DisablePurviewStylePolicyValidation. The console app needs
no public types, so IWeatherService, WeatherForecast and
IWeatherServiceTelemetry are now internal and the suppression is gone.

Five of the remaining suppressions no longer fire (CA1303, CA1812,
CA2007, CA2201, CS1574) and two are now fixed rather than silenced:
Summary is initialised (CS8618) and activities are modelled as Activity?
(TSG3022), which also clears the CS8604s that surfaced. Three
pre-existing PDS0003 warnings in Program.cs are fixed too.

The solution now builds with no warnings and no errors, leaving CA1031
and CA5394 as the only suppressions.
@kieronlanning
kieronlanning merged commit c97fb5a into main Oct 7, 2026
2 checks passed
@kieronlanning
kieronlanning deleted the telemetry-name-gen branch October 7, 2026 19:07
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.

1 participant