microsoft / wil

Windows Implementation Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return failed HRESULT, log failure but don't send telemetry

araujoarthur0 opened this issue · comments

For the result macros, when one sets a telemetry fallback provider with SetResultTelemetryFallback() and a logging callback with SetResultLoggingCallback(), we always log and send telemetry for HRESULT failures in the RETURN_ macros.
The _EXPECTED macros allows one to skip the reporting for some expected HRESULTs, but that suppresses both logging and telemetry.

Is there a way to suppress only telemetry for expected scenarios, but still get logging?

The scenario is when you don't want the telemetry to have expected errors, but they still help in debugging when looking at a local log.

From what I recall, this question has come up a couple times in the past and from what I remember, no it's not possible. Someone like @ChrisGuzak can hopefully provide more commentary/history here.