Skip to content

OTelHttp client metrics are not recorded in case of an error when handling the round trip #6940

Open
@AyseGokmen

Description

@AyseGokmen

Description

OTelHttp client metrics have no way to record the error because it exists early when handling errors.

Environment

  • OS: macOS
  • Architecture: arm64
  • Go Version: 1.24
  • otelhttp version: v0.60.0

Steps To Reproduce

  1. Send a http request using otelhttp transport which would timeout
  2. Observe that http.client.request.duration metric is not recorded.

Expected behavior

  • http.client.request.duration should still be recorded when an error happens during the round trip like timeouts.
  • http.client.request.duration should have the error.type attribute set when a net.http or other type of error happens during the transport round trip.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Low priority

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions