-
Notifications
You must be signed in to change notification settings - Fork 858
Closed
Labels
bugSomething isn't workingSomething isn't workingpkg:OpenTelemetry.Exporter.OpenTelemetryProtocolIssues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet packageIssues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package
Description
Package
OpenTelemetry.Exporter.OpenTelemetryProtocol
Package Version
| Package Name | Version |
|---|---|
| OpenTelemetry.Exporter.OpenTelemetryProtocol | 1.11.0 |
Runtime Version
net48
Description
I'm not able to export logs/metrics/traces using gRPC in net48 projects .
Steps to Reproduce
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleAppFramework
{
internal class Program
{
static void Main(string[] args)
{
using (var provider = Sdk
.CreateTracerProviderBuilder()
.AddSource("test")
.SetResourceBuilder(ResourceBuilder
.CreateEmpty()
.AddService("ConsoleAppFramework"))
.AddOtlpExporter()
.Build())
{
var source = new ActivitySource("test");
while (true)
{
using (var activity = source.StartActivity("testing"))
{
Thread.Sleep(1000);
}
}
}
}
}
}
Expected Result
Traces get successfully exported
Actual Result
An exception is thrown at line 42 here
Lines 35 to 45 in 75d947c
| /// <inheritdoc/> | |
| public override ExportClientResponse SendExportRequest(byte[] buffer, int contentLength, DateTime deadlineUtc, CancellationToken cancellationToken = default) | |
| { | |
| try | |
| { | |
| using var httpRequest = this.CreateHttpRequest(buffer, contentLength); | |
| using var httpResponse = this.SendHttpRequest(httpRequest, cancellationToken); | |
| httpResponse.EnsureSuccessStatusCode(); | |
The exception message is
Only HTTP/1.0 and HTTP/1.1 version requests are currently supported. Parameter name: value
Additional Context
Exporting via HTTP works fine.
cosminlwpw
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpkg:OpenTelemetry.Exporter.OpenTelemetryProtocolIssues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet packageIssues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package