-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add standalone activity metrics #8759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cursor review |
bergundy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks really good. I would consider restructuring the code as I suggested to make it easier to follow.
77b6f1c to
3ba3273
Compare
95f23c2 to
516247d
Compare
bergundy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving assuming that the attempt start to close metrics are emitted only when transitioning from a state that is not scheduled.
2a2b8a4 to
d8c8df8
Compare
What changed?
Add standalone activity metrics
Why?
Need standalone activity metrics for observability purposes
How did you test it?
Note
Adds comprehensive metrics and payload-size recording for standalone activities, introducing contextual request wrappers and wiring metrics through state transitions, timeout executors, and history APIs.
RequestWithContextcarryingToken,MetricsHandler,NamespaceName, andBreakdownMetricsByTaskQueueand replaces prior request wrappers.ActivityStartToCloseLatency,ActivityScheduleToCloseLatency, success/fail/cancel/timeout counters, and per-timeout tags.recordPayloadSize(...)to emit payload sizes for input, heartbeat details, results, and failures.chasm/lib/activity/activity_tasks.go):timeoutTaskExecutorOptions(dynamic config, metrics, namespace registry); resolve namespace and emit timeout metrics during schedule/start/close/heartbeat timeouts and retries.metrics.Handlerandnamespace.Registry;StartActivityExecutionemits input payload size on scheduling.RequestWithContext(token, metrics handler, namespace, breakdown setting) into chasm component calls.Written by Cursor Bugbot for commit 02c6aba. This will update automatically on new commits. Configure here.