feat: Dual emitting timer and histogram metrics#1048
feat: Dual emitting timer and histogram metrics#1048neil-xie wants to merge 6 commits intocadence-workflow:masterfrom
Conversation
ed92900 to
992260c
Compare
| Duration.ofNanos(TimeUnit.SECONDS.toNanos(100))); | ||
|
|
||
| /** | ||
| * High-resolution bucket configuration for long-running operations. |
| Duration.ofNanos(TimeUnit.HOURS.toNanos(24))); | ||
|
|
||
| /** | ||
| * Medium-resolution bucket configuration for long-running operations. |
| com.uber.m3.util.Duration d = com.uber.m3.util.Duration.ofNanos(nanoTime - wfStartTimeNanos); | ||
| metricsScope.timer(MetricsType.WORKFLOW_E2E_LATENCY).record(d); | ||
| MetricsEmit.emitLatency( | ||
| metricsScope, MetricsType.WORKFLOW_E2E_LATENCY, d, HistogramBuckets.HIGH_1MS_24H); |
There was a problem hiding this comment.
Is this also what we use for Go SDK? A few workflows may have E2E latency > 24hrs.
There was a problem hiding this comment.
In go, we used the algorithmic exponential buckets with headroom, last bucket is ~74.5h. Here I have to manually define the buckets. I also asked in the dev channel, does user still care when the workflow was running for more than 1 day?
There was a problem hiding this comment.
I can stamp to un-block you. We could add more buckets later.
Signed-off-by: Neil Xie <neil.xie@uber.com>
Signed-off-by: Neil Xie <neil.xie@uber.com>
Signed-off-by: Neil Xie <neil.xie@uber.com>
a270288 to
892840e
Compare
Code Review ✅ Approved 1 resolved / 1 findingsImplements dual-emitting timer and histogram metrics, resolving the incorrect metric naming convention found in test mocks. No outstanding issues remain. ✅ 1 resolved✅ Bug: Test histogram mocks use wrong metric name (missing _ns suffix)
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
What changed?
Start dual emitting histogram metrics as part of timer -> histogram metrics migration
Added migration doc to example the changes
Why?
Time -> histogram migration
cadence-workflow/cadence#7741
How did you test it?
Unit test
Potential risks
Backward compatibility, only risk is the metrics storage usage increase
Release notes
Documentation Changes