Skip to content

Log export failures when IncludeScopes is enabled for ASP.NET Core applications #263

@stevejgordon

Description

@stevejgordon

If Information level logs for System.Net.Http.HttpClient are enabled in an application, the following two logs are produced and captured in the console output:

info: System.Net.Http.HttpClient.Default.ClientHandler[101]
      Received HTTP response headers after 765.3231ms - 200
info: System.Net.Http.HttpClient.Default.LogicalHandler[101]
      End processing HTTP request after 830.0194ms - 200

However, an error is returned once the next batch of logs is exported.

fail: Elastic.OpenTelemetry[0]
      OTEL-SDK: [32868] Export failed for https://my-project-123abc.ingest.us-east-1.aws.elastic.cloud/opentelemetry.proto.collector.logs.v1.LogsService/Export. Message: Export failed due to unexpected status code.. Status(StatusCode="Unavailable", Detail="flush failed (400): {"error":{"type":"x_content_parse_exception","caused_by":{"type":"json_parse_exception"}}}").

Steps:

  • Investigate if this occurs with the classic APM endpoint
  • Investigate if this occurs without the Elastic logger defaults
  • Investigate the server-side error to understand what specifically was in the JSON
  • Investigate if this needs fixing in the upstream SDK, EDOT or on the server

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions