feat: add wrong_expected_version span event to aggregate execute OTel - #61
Conversation
PR SummaryMedium Risk Overview Updates OpenTelemetry aggregate execute stop handling to record a Written by Cursor Bugbot for commit 10c250a. This will update automatically on new commits. Configure here. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
WalkthroughAdds a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
174de8b to
d2f1570
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/opentelemetry/aggregate_test.exs`:
- Line 26: There's a typo calling the non-existent module OTelOTelAggregate in
the test; replace the incorrect module name with OTelAggregate so the call
OTelOTelAggregate.setup() becomes OTelAggregate.setup(). Update the test
reference to use the correct module symbol OTelAggregate to fix the compilation
error.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cc3d0514-98c5-425d-97ee-e16d55bbab19
📒 Files selected for processing (5)
lib/commanded/aggregates/aggregate.exlib/commanded/opentelemetry/aggregate.exlib/commanded/opentelemetry/commanded_attributes.extest/aggregates/aggregate_telemetry_test.exstest/opentelemetry/aggregate_test.exs
ec58024 to
4c5ac31
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
4c5ac31 to
58c4ec9
Compare
…etadata Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
58c4ec9 to
10c250a
Compare

Tracks wrong_expected_version count in the aggregate struct, exposes it via telemetry :stop metadata, and records a span event with the count on the OTel execute span when > 0.
wrong_expected_version_countto %Aggregate{} structcommanded_wrong_expected_version_countto CommandedAttributes