Skip to content

Remove actor tag from event metrics across all modules#23

Merged
vanrogu merged 1 commit intodevelopfrom
claude/remove-actor-tag-metrics-X6eMI
Feb 11, 2026
Merged

Remove actor tag from event metrics across all modules#23
vanrogu merged 1 commit intodevelopfrom
claude/remove-actor-tag-metrics-X6eMI

Conversation

@vanrogu
Copy link
Member

@vanrogu vanrogu commented Feb 11, 2026

Summary

This change removes the "actor" tag from all event-related metrics throughout the event modeling framework. The actor field was being extracted from tracing information and used as a metric tag, but is now being removed to simplify metric cardinality and focus on channel-based tracking.

Key Changes

  • BoundedContextImpl: Removed actor extraction and tag from both event() and incoming() methods' metrics for domain and inbound events
  • InboundModule: Removed actor tag from translator metrics (counter and timer)
  • OutboundModule: Removed actor tag from dispatcher metrics (counter and timer)
  • ReadModelAdapter: Removed actor tag from read model event metrics (counter and timer)
  • AggregateEventAppenderImpl: Removed actor tag from domain event metrics when appending aggregate events
  • AggregateModule: Removed actor tag from aggregate load count metrics
  • ExecuteCommandCommand: Removed actor tag from domain event metrics in DCB command execution

Implementation Details

  • The actor variable extraction (tracing.actor() != null ? tracing.actor() : "unknown") has been completely removed from all locations
  • Cache keys for metric lookups have been simplified by removing the actor component (e.g., eventName + ":" + actor + ":" + channeleventName + ":" + channel)
  • The "actor" tag has been removed from all Tags.of() and io.micrometer.core.instrument.Tags.of() calls
  • The channel tag remains as the primary tracing dimension for metrics

https://claude.ai/code/session_01HW5m2CmCSTqTMtj5kgdhAV

The actor tag causes cardinality explosion in metrics backends since
each unique user/actor creates a new time series. Removed from all 12
metric registrations across 7 files: domain event counters, aggregate
load counters, translator counters/timers, dispatcher counters/timers,
readmodel update counters/timers, provided event counters, and inbound
event counters.

https://claude.ai/code/session_01HW5m2CmCSTqTMtj5kgdhAV
@vanrogu vanrogu merged commit 81666fb into develop Feb 11, 2026
1 check failed
@vanrogu vanrogu deleted the claude/remove-actor-tag-metrics-X6eMI branch February 11, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants