Hive Hive
Sign in

fix(server): handle streamed Req telemetry results

GitHub issue · Closed

Metadata
Source
tuist/tuist #11251
Updated
Jun 24, 2026
Details

What changed

  • Normalized the Req/Finch telemetry result values in Tuist.HTTP.PromExPlugin before deriving PromEx request tags.
  • Added focused regressions for streamed Req success and streamed timeout/error result shapes.

Why

Sentry was reporting telemetry handler crashes for outbound job-log requests. The PromEx request tag extractor only handled plain results like {:ok, %Req.Response{}} and {:error, exception}. Req telemetry can also report streamed into results as tuple shapes such as {:ok, {%Req.Request{}, %Req.Response{}}} and {:error, exception, {%Req.Request{}, %Req.Response{}}}.

Because those shapes were not matched, the telemetry handler itself crashed with a CaseClauseError, producing issues like https://tuist.sentry.io/issues/127401699/.

Impact

HTTP request metrics continue to be emitted for the streamed Req cases instead of turning telemetry into a production exception source. Successful streamed responses keep their status tag, and streamed failures keep a sanitized error tag.

Validation

  • Added the regression first and reproduced the CaseClauseError locally.
  • Ran mix format lib/tuist/http/prom_ex_plugin.ex test/tuist/http/prom_ex_plugin_test.exs.
  • Ran mix test test/tuist/http/prom_ex_plugin_test.exs.
  • Ran git diff --check.
Comments
TA
tuist-atlas[bot] Jun 13, 2026

The fix for handling streamed Req telemetry results is now available in xcresult-processor-image@0.19.1. Update to this version to get the fix for the telemetry handler crashes caused by streamed into result shapes.

TA
tuist-atlas[bot] Jun 13, 2026

The fix for handling streamed Req telemetry results is now available in server@1.210.6. Please update to this version to benefit from the change.