Class MetalTelemetryExtensions
- Namespace
- DotCompute.Backends.Metal
- Assembly
- DotCompute.Backends.Metal.dll
Extension methods for configuring Metal telemetry and monitoring
public static class MetalTelemetryExtensions
- Inheritance
-
MetalTelemetryExtensions
- Inherited Members
Methods
AddMetalTelemetry(IServiceCollection, IConfiguration, string)
Adds Metal telemetry services with configuration from appsettings
public static IServiceCollection AddMetalTelemetry(this IServiceCollection services, IConfiguration configuration, string sectionName = "MetalTelemetry")
Parameters
servicesIServiceCollectionconfigurationIConfigurationsectionNamestring
Returns
AddMetalTelemetry(IServiceCollection, Action<MetalTelemetryOptions>?)
Adds Metal telemetry services to the dependency injection container
public static IServiceCollection AddMetalTelemetry(this IServiceCollection services, Action<MetalTelemetryOptions>? configureOptions = null)
Parameters
servicesIServiceCollectionconfigureOptionsAction<MetalTelemetryOptions>
Returns
EnableAlerts(MetalTelemetryOptions, params string[])
Enables alert notifications
public static MetalTelemetryOptions EnableAlerts(this MetalTelemetryOptions options, params string[] notificationEndpoints)
Parameters
optionsMetalTelemetryOptionsnotificationEndpointsstring[]
Returns
EnableProductionLogging(MetalTelemetryOptions, bool, bool, params string[])
Enables production logging features
public static MetalTelemetryOptions EnableProductionLogging(this MetalTelemetryOptions options, bool useJsonFormat = true, bool enableCorrelationTracking = true, params string[] externalEndpoints)
Parameters
optionsMetalTelemetryOptionsuseJsonFormatboolenableCorrelationTrackingboolexternalEndpointsstring[]
Returns
SetIntervals(MetalTelemetryOptions, TimeSpan?, TimeSpan?, TimeSpan?)
Configures telemetry intervals
public static MetalTelemetryOptions SetIntervals(this MetalTelemetryOptions options, TimeSpan? reportingInterval = null, TimeSpan? cleanupInterval = null, TimeSpan? exportInterval = null)
Parameters
optionsMetalTelemetryOptionsreportingIntervalTimeSpan?cleanupIntervalTimeSpan?exportIntervalTimeSpan?
Returns
SetPerformanceThresholds(MetalTelemetryOptions, double, double, double)
Configures performance thresholds
public static MetalTelemetryOptions SetPerformanceThresholds(this MetalTelemetryOptions options, double slowOperationMs = 100, double highGpuUtilization = 85, double highMemoryUtilization = 80)
Parameters
optionsMetalTelemetryOptionsslowOperationMsdoublehighGpuUtilizationdoublehighMemoryUtilizationdouble
Returns
UseApplicationInsights(MetalTelemetryOptions, string, string)
Configures Application Insights export
public static MetalTelemetryOptions UseApplicationInsights(this MetalTelemetryOptions options, string endpoint, string instrumentationKey)
Parameters
optionsMetalTelemetryOptionsendpointstringinstrumentationKeystring
Returns
UseDataDog(MetalTelemetryOptions, string, string)
Configures DataDog export
public static MetalTelemetryOptions UseDataDog(this MetalTelemetryOptions options, string endpoint, string apiKey)
Parameters
optionsMetalTelemetryOptionsendpointstringapiKeystring
Returns
UseGrafanaCloud(MetalTelemetryOptions, string, string)
Configures Grafana Cloud export
public static MetalTelemetryOptions UseGrafanaCloud(this MetalTelemetryOptions options, string endpoint, string apiKey)
Parameters
optionsMetalTelemetryOptionsendpointstringapiKeystring
Returns
UseOpenTelemetry(MetalTelemetryOptions, string, Dictionary<string, string>?)
Configures OpenTelemetry export
public static MetalTelemetryOptions UseOpenTelemetry(this MetalTelemetryOptions options, string endpoint, Dictionary<string, string>? headers = null)
Parameters
optionsMetalTelemetryOptionsendpointstringheadersDictionary<string, string>
Returns
UsePrometheusExport(MetalTelemetryOptions, string, Dictionary<string, string>?)
Configures Prometheus metrics export
public static MetalTelemetryOptions UsePrometheusExport(this MetalTelemetryOptions options, string endpoint, Dictionary<string, string>? headers = null)
Parameters
optionsMetalTelemetryOptionsendpointstringheadersDictionary<string, string>