HttpMetricsEnrichmentContext Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides functionality for enriching the http.client.request.duration
metric.
public ref class HttpMetricsEnrichmentContext sealed
public sealed class HttpMetricsEnrichmentContext
type HttpMetricsEnrichmentContext = class
Public NotInheritable Class HttpMetricsEnrichmentContext
- Inheritance
-
HttpMetricsEnrichmentContext
Remarks
Enrichment is done on per-request basis by callbacks registered with AddCallback(HttpRequestMessage, Action<HttpMetricsEnrichmentContext>).
The callbacks are responsible for adding custom tags via AddCustomTag(String, Object) for which they can use the request, response, and error information exposed on the HttpMetricsEnrichmentContext instance.
Important
The HttpMetricsEnrichmentContext instance must not be used from outside of the enrichment callbacks.
Properties
Exception |
Gets the exception that occurred, or |
Request |
Gets the HttpRequestMessage that has been sent. |
Response |
Gets the HttpRequestMessage received from the server, or |
Methods
AddCallback(HttpRequestMessage, Action<HttpMetricsEnrichmentContext>) |
Adds a callback to register custom tags for the |
AddCustomTag(String, Object) |
Appends a custom tag to the list of tags to be recorded with the |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |