artefactual-sdps / enduro

Designed to automate the processing of transfers in multiple Archivematica pipelines.
https://enduro.readthedocs.io/
Apache License 2.0
4 stars 3 forks source link

Enable tracing in the a3m gRPC client #905

Closed sevein closed 3 months ago

sevein commented 3 months ago

Enable OpenTelemetry tracing in the gRPC client and create it from main following recommended practices. I've also added a small test for the a3m activity, but it's improvable.

After checking out the traces in Grafana I realized that we were sending hundreds of Read requests to a3m so I've also introduced a small wait between reads to reduce the frequency.

image

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 43.47826% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 48.17%. Comparing base (9f4a60a) to head (32ae4fb). Report is 1 commits behind head on main.

Files Patch % Lines
cmd/enduro-a3m-worker/main.go 0.00% 6 Missing :warning:
internal/a3m/client.go 0.00% 6 Missing :warning:
internal/a3m/a3m.go 90.90% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #905 +/- ## ========================================== + Coverage 46.83% 48.17% +1.33% ========================================== Files 103 103 Lines 5549 5555 +6 ========================================== + Hits 2599 2676 +77 + Misses 2713 2636 -77 - Partials 237 243 +6 ```

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