astarte-platform / astarte

Core Astarte Repository
https://docs.astarte-platform.org/
Apache License 2.0
238 stars 46 forks source link

Metrics: expose API calls details in services #905

Closed Annopaolo closed 6 months ago

Annopaolo commented 6 months ago

Add the total number of bytes exchanged via HTTP to metrics (both sent and received). In general, each API service now exposes four new metrics:

Values are tagged by realm name, except for Housekeeping API.

In order not to slow down the handling of incoming calls, count and byte size are computed in a different process.

codecov[bot] commented 6 months ago

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (a882ec1) 68.34% compared to head (64fbeaa) 68.47%.

Files Patch % Lines
...ngine_api_web/plug/telemetry_request_count_plug.ex 88.88% 1 Missing :warning:
...gine_api_web/plug/telemetry_response_count_plug.ex 83.33% 1 Missing :warning:
...eping_api_web/plug/telemetry_request_count_plug.ex 85.71% 1 Missing :warning:
...ping_api_web/plug/telemetry_response_count_plug.ex 80.00% 1 Missing :warning:
...iring_api_web/plug/telemetry_request_count_plug.ex 87.50% 1 Missing :warning:
...ring_api_web/plug/telemetry_response_count_plug.ex 83.33% 1 Missing :warning:
...ement_api_web/plug/telemetry_request_count_plug.ex 88.88% 1 Missing :warning:
...ment_api_web/plug/telemetry_response_count_plug.ex 83.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #905 +/- ## ========================================== + Coverage 68.34% 68.47% +0.12% ========================================== Files 274 278 +4 Lines 7067 7108 +41 ========================================== + Hits 4830 4867 +37 - Misses 2237 2241 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Annopaolo commented 6 months ago

Superseded by #910.