feat: Add OpenTelemetry instrumentation for aggregate populate - #47
Conversation
PR SummaryIntroduces tracing for aggregate populate lifecycle.
Written by Cursor Bugbot for commit 03c697d. This will update automatically on new commits. Configure here. |
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds OpenTelemetry instrumentation for aggregate population: new Changes
Sequence Diagram(s)sequenceDiagram
participant Aggregate as Aggregate
participant Telemetry as Telemetry
participant Handler as AggregatePopulate<br/>(handler)
participant OTel as OpenTelemetry<br/>Tracer
Aggregate->>Telemetry: emit [:commanded, :aggregate, :populate, :start]
Telemetry->>Handler: handle_telemetry_event/4 (start)
Handler->>Handler: build attributes (messaging, code, commanded)
Handler->>OTel: start_span("commanded.aggregate.populate")
OTel-->>Handler: span_ref
Aggregate->>Aggregate: populate aggregate (apply events)
Aggregate->>Telemetry: emit [:commanded, :aggregate, :populate, :stop]
Telemetry->>Handler: handle_telemetry_event/4 (stop)
Handler->>Handler: set event_count & aggregate_version attrs
Handler->>OTel: set_attributes(span_ref, attrs)
Handler->>OTel: end_span(span_ref)
OTel-->>Handler: span closed
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
b11682e to
e20783d
Compare
4047054 to
d033c2d
Compare
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
d033c2d to
03c697d
Compare
No description provided.