Track offline transfer export completion with internal events

What does this MR do and why?

Adds internal-events observability for the successful completion of an offline transfer export, so we can measure success rate and how often exports finish with partial failures — surfaced in Tableau.

Part of #592635 (closed) (2 of 3, by event type). The start event merged in !245668 (merged); the fail event follows in a stacked MR.

Event

Fires complete_offline_transfer_export from the Import::Offline::Export state machine on transition to :finished (via run_after_commit, next to the completion email), which captures every path to :finished:

  • label = with_failures / without_failures (from has_failures?), mirroring Direct Transfer's finished-with/without-failures split.

On generic vs. OT-specific events (thanks @rodrigo.tomonari)

An earlier revision used a generic complete_export + label: <source>. Per review, that's dropped: an OT export event represents a whole portable tree (one operation), whereas Direct Transfer exports at the group/project level — different units that a shared event would conflate. So completion is instrumented as an OT-specific event here. A generic, cross-importer event belongs in the shared relation-export layer (per entity), as future work.

Metrics

data_source: internal_events, in config/metrics/counts_all/:

  • total completed — 28d + all-time (success)
  • completed with failures — 28d + all-time, filtered label: with_failures (partial-failure rate)

How to set up and validate locally

bin/rspec spec/models/import/offline/export_spec.rb
Edited by James Nutt

Merge request reports

Loading
Loading