temporalio / temporalio/sdk-java

Add metric for time passed from the activity scheduling to the last attempt

Open
#1,035 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
433
Forks
249
Avg merge
5d 6h
Merged PRs (30d)
26

Description

Is your feature request related to a problem? Please describe.
If users want to set an alert for activities that keep retrying and failing, there is no appropriate metric to handle that.
activity_succeed_endtoend_latency includes only successful executions.
activity_execution_latency handles the execution of a single activity task only.

Describe the solution you'd like
We should add a metric reporting how much time passed from an activity schedule to the last activity attempt. This metric should have an activity type as a tag and be SDK side.

Describe alternatives you've considered
Users can produce their own custom metrics. But it looks like such a common concern, that Temporal SDK should provide a built-in way to detect it.

GoSDK issue: https://github.com/temporalio/sdk-go/issues/718

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Java SDK instrumentation for activity_succeed_endtoend_latency and activity_execution_latency, then trace how activity scheduling and retry attempts are represented. Done means a built-in SDK metric reports elapsed time from scheduling to the last attempt and includes activity type as a tag; the issue names no specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.