You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When addind Tracing and Metrics via the builder API. traceOptions and metricsOptions are the same object.
Therefore its not possible to set different endpoints for metrics and traces, which is essential when not using the default value ("http://localhost:4318").
define separate endpoint in traceOptions and metricsOptions
What is the actual behavior?
defining separate endpoints viatraceOptions and metricsOptions is not possible.
In consequence the TraceOptions get overwritten => bad request for traces:
Create a fresh Asp.NET Core and configure the services with the code above.
Set a breakpoint at metricsOptions .Protocol = OtlpExportProtocol.HttpProtobuf; and investigate the Properties.
They are already set.
To test this issue, modify the builder part in ServiceProviderHttpClientFactoryInvoked in test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OtlpTraceExporterTests.cs
Bug Report
OpenTelemetry.Exporter.Console 1.4.0-rc.1
OpenTelemetry.Exporter.OpenTelemetryProtocol 1.4.0-rc.1
OpenTelemetry.Extensions.Hosting 1.4.0-rc.1
OpenTelemetry.Instrumentation.AspNetCore 1.0.0-rc9.10
OpenTelemetry.Instrumentation.Http 1.0.0-rc9.10
OpenTelemetry.Instrumentation.Runtime 1.1.0-beta.2
net6.0`
Symptom
When addind Tracing and Metrics via the builder API. traceOptions and metricsOptions are the same object.
Therefore its not possible to set different endpoints for metrics and traces, which is essential when not using the default value ("http://localhost:4318").
What is the expected behavior?
define separate endpoint in traceOptions and metricsOptions
What is the actual behavior?
defining separate endpoints viatraceOptions and metricsOptions is not possible.
In consequence the TraceOptions get overwritten => bad request for traces:
Reproduce
Create a fresh Asp.NET Core and configure the services with the code above.
Set a breakpoint at
metricsOptions .Protocol = OtlpExportProtocol.HttpProtobuf;
and investigate the Properties.They are already set.
To test this issue, modify the builder part in
ServiceProviderHttpClientFactoryInvoked
intest/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OtlpTraceExporterTests.cs
to
set a breakpoint in the second AddOtlpExporter and see that the options have the trace values set
We will close this issue if:
projects, so don't point us to such, please.
Additional Context
Workaround
Passing the name parameter into AddOtlpExporter fixes the issue:
The text was updated successfully, but these errors were encountered: