EnrichmentServiceCollectionExtensions Class

Definition

Lets you register telemetry enrichers in a dependency injection container.

C#
public static class EnrichmentServiceCollectionExtensions
Inheritance
EnrichmentServiceCollectionExtensions

Methods

AddLogEnricher(IServiceCollection, ILogEnricher)

Registers a log enricher instance.

AddLogEnricher<T>(IServiceCollection)

Registers a log enricher type.

AddStaticLogEnricher(IServiceCollection, IStaticLogEnricher)

Registers a static log enricher instance.

AddStaticLogEnricher<T>(IServiceCollection)

Registers a static log enricher type.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)