Package
OpenTelemetry.Exporter.OpenTelemetryProtocol
Package Version
| Package Name |
Version |
| OpenTelemetry.Exporter.OpenTelemetryProtocol |
1.15.0 |
| OpenTelemetry.Extensions.Hosting |
1.15.0 |
Runtime Version
net10.0
Description
Configuring the OtlpExporter through builder.Services.Configure<OtlpExporterOptions>(...) works when running locally through Kestrel but when running on IIS InProcess (with the default web.config of dotnet publish) the configuration does not get applied.
I've reproduced this error in two different PCs, both with no environment variables that could affect this.
Steps to Reproduce
- Use
builder.Services.Configure<OtlpExporterOptions>(builder.Configuration.GetSection("OpenTelemetry")) to configure OtlpExporterOptions.
- Build the application with
dotnet publish -c Release -o build
- Deploy the application on IIS:
- Create AppPool with
No Managed Code
- Add a new Application with the path to the build directory
- Configure permissions for the build directory (for example by adding Everyone and granting full control)
- Execute the root
/ endpoint
OtelExporterMinimalExample.zip
Expected Result
The endpoint should return the same value, read from the appsettings.json, for both Kestrel and IIS deployed applications, in this case http://172.16.0.10:4317
Actual Result
The IIS deployed application replies with http://localhost:4317 (and the Otlp exporter does not contact the http://172.16.0.10:4317 endpoint)
Additional Context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Package
OpenTelemetry.Exporter.OpenTelemetryProtocol
Package Version
Runtime Version
net10.0
Description
Configuring the OtlpExporter through
builder.Services.Configure<OtlpExporterOptions>(...)works when running locally through Kestrel but when running on IIS InProcess (with the default web.config of dotnet publish) the configuration does not get applied.I've reproduced this error in two different PCs, both with no environment variables that could affect this.
Steps to Reproduce
builder.Services.Configure<OtlpExporterOptions>(builder.Configuration.GetSection("OpenTelemetry"))to configure OtlpExporterOptions.dotnet publish -c Release -o buildNo Managed Code/endpointOtelExporterMinimalExample.zip
Expected Result
The endpoint should return the same value, read from the appsettings.json, for both Kestrel and IIS deployed applications, in this case
http://172.16.0.10:4317Actual Result
The IIS deployed application replies with
http://localhost:4317(and the Otlp exporter does not contact thehttp://172.16.0.10:4317endpoint)Additional Context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.