OtlpConfigurationExtensions.AddOtlpEnvironment Method
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.
Configures OpenTelemetry in projects using environment variables.
public static void AddOtlpEnvironment (Aspire.Hosting.ApplicationModel.IResource resource, Microsoft.Extensions.Configuration.IConfiguration configuration, Microsoft.Extensions.Hosting.IHostEnvironment environment);
static member AddOtlpEnvironment : Aspire.Hosting.ApplicationModel.IResource * Microsoft.Extensions.Configuration.IConfiguration * Microsoft.Extensions.Hosting.IHostEnvironment -> unit
Public Sub AddOtlpEnvironment (resource As IResource, configuration As IConfiguration, environment As IHostEnvironment)
Parameters
- resource
- IResource
The resource to add annotations to.
- configuration
- IConfiguration
The configuration to use for the OTLP exporter endpoint URL.
- environment
- IHostEnvironment
The host environment to check if the application is running in development mode.