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

Add more tracing instrumentation #885

Closed sevein closed 3 months ago

sevein commented 3 months ago

This pull request adds more instrumentation in different areas of the project. It includes multiple commits addressing different concerns. The main four changes are:

With these changes, we'll see a significant increase in the number of traces captured by Tempo. We're not yet initiating a trace during the transfer submission via MinIO; however, an interesting example that can already be observed is the move workflow initiated through the API. If you've already moved a package, use this query to find related traces:

{ .http.route="/package/{id}/move" }

It should look like this:

image

Something that becomes apparent right away is the lag between activity executions - we know that's the cost of using Temporal to schedule activities. It also shows that local activities are much faster since they're not coordinated with the Temporal server.

You can also search for a workflow directly, e.g.:

{name="StartWorkflow:processing-workflow"}

This trace is interesting because it shows that the telemetry data originates from multiple services, specifically "enduro" and "enduro-a3m-worker", rather than a singular source.