Class MetricsExtensions
Extension utilities for metrics.
Inherited Members
Namespace: Cognite.Extractor.Metrics
Assembly: Cognite.Metrics.dll
Syntax
public static class MetricsExtensions
Methods
| Edit this page View SourceAddMetrics(IServiceCollection, int)
Adds a configured metrics service to the services
collection
Also adds a named IHttpClientFactory to be used by the push gateways, with
simple retry policy to handle transient http errors configured (5 retries with exponential backoff).
Declaration
public static void AddMetrics(this IServiceCollection services, int pushTimeout = 80000)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | |
int | pushTimeout | Timeout in milliseconds for each push attempt |