mirror of
https://github.com/apache/superset.git
synced 2026-07-12 01:35:36 +00:00
T037 — Instrument the five phases of get_activity with stats_logger timing metrics under the `superset.activity_view.<kind>.<phase>_ms` key convention (plan §D-17). Wrap each phase with a stats_timing context manager: * superset.activity_view.<kind>.relationship_resolution_ms (_resolve_scope) * superset.activity_view.<kind>.fetch_ms (_fetch_change_records) * superset.activity_view.<kind>.visibility_filter_ms * superset.activity_view.<kind>.denormalize_ms * superset.activity_view.<kind>.decorate_ms `<kind>` is the lowercased path-entity model class name (dashboard / slice / sqlatable), enabling per-endpoint-family Grafana panels. T038 — Add request- and response-shape attributes via the existing counter/gauge interface: * superset.activity_view.<kind>.requests.include_<value> (incr) * superset.activity_view.<kind>.requests.has_since_filter_<true|false> (incr) * superset.activity_view.<kind>.page_size (gauge) * superset.activity_view.<kind>.record_count (gauge — post-visibility-filter) * superset.activity_view.<kind>.related_entity_count.charts (gauge) * superset.activity_view.<kind>.related_entity_count.datasets (gauge) Confirmed no PII: entity names, diff content, user identifiers — none flow into the metric layer. Only counts and shape tags. T050 — Cross-coupling sanity test (unit-scope): asserts _METRIC_PREFIX == "superset.activity_view" so a code review catches accidental drift from sc-103156's eventual "superset.versioning.*" sibling namespace. Both endpoint families belong to one Grafana panel under "superset.versioning.* OR superset.activity_view.*". Full suite: 66 unit + 35 integration + 1 xfailed (T044 sc-103156 restore-kind dependency, unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>