-
Notifications
You must be signed in to change notification settings - Fork 293
Closed as not planned
Closed as not planned
Copy link
Description
See microsoft/ApplicationInsights-dotnet-server#897.
- There is no indication as to what values can be passed as the key.
- There is no type-safety in the values returned.
tl;dr there's no way for anyone to know that they can call
if (myDependencyTelemetryInstance.TryGetOperationDetail("HttpRequest", out var rawMsg)
&& rawMsg is HttpRequestMessage message)
{
// do something with message
}The only reason I know to do the above is because I trawled through issues and PRs in this repo. Most people probably won't be as patient, and they shouldn't need to be.
Suggestion
- Publicly expose relevant
RemoteDependencyConstantskeys. - Add specific overloads on
DependencyTelemetrythat reflect whatHttpCoreDiagnosticSourceListenerandHttpProcessingare storing:
bool TryGetHttpRequestOperationDetail(out HttpRequestMessage message);
bool TryGetHttpResponseOperationDetail(out HttpResponseMessage message);
bool TryGetHttpResponseHeadersOperationDetail(out WebHeaderCollection headers);- Actually publicise the existence of these predefined keys and values in the official docs for
DependencyTelemetry.TryGetOperationDetail.
bh3605