[OTLP] Set TE header for gRPC calls (#6449)
This commit is contained in:
parent
84b3ca4e11
commit
7a4643a829
|
|
@ -19,6 +19,10 @@ Notes](../../RELEASENOTES.md).
|
|||
Note that exporting `logrecord.event.id` is still behind that same feature
|
||||
flag. ([#6306](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6306))
|
||||
|
||||
* gRPC calls to export traces, logs, and metrics using `OtlpExportProtocol.Grpc`
|
||||
now set the `TE=trailers` HTTP request header to improve interoperability.
|
||||
([#6449](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6449))
|
||||
|
||||
## 1.12.0
|
||||
|
||||
Released 2025-Apr-29
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@ internal sealed class OtlpGrpcExportClient : OtlpExportClient
|
|||
try
|
||||
{
|
||||
using var httpRequest = this.CreateHttpRequest(buffer, contentLength);
|
||||
|
||||
// TE is required by some servers, e.g. C Core.
|
||||
// A missing TE header results in servers aborting the gRPC call.
|
||||
httpRequest.Headers.TryAddWithoutValidation("TE", "trailers");
|
||||
|
||||
using var httpResponse = this.SendHttpRequest(httpRequest, cancellationToken);
|
||||
|
||||
httpResponse.EnsureSuccessStatusCode();
|
||||
|
|
|
|||
Loading…
Reference in New Issue