temporalio / features

Behavior and history compatibility testing for Temporal SDKs
13 stars 17 forks source link

[Feature Request] SDK should expose workflow_started metric #25

Open mastermanu opened 2 years ago

mastermanu commented 2 years ago

wf_completed, wf_continue_as_new exists, but there is no corresponding wf_started metric.

MattGurney commented 11 months ago

We would also like this.

MattGurney commented 11 months ago

As suggested on the Temporal Slack channel, I used this metric instead: temporal_request{operation="StartWorkflowExecution"}

taonic commented 11 months ago

As suggested on the Temporal Slack channel, I used this metric instead: temporal_request{operation="StartWorkflowExecution"}

Just wanted to clarify for folks without the full context. temporal_request{operation="StartWorkflowExecution"} is really just an approximation to what this issue is requesting - workflow_started. The temporal_request metric only track the attempts made by the client, instead of the actual Workflow execution from the worker side. For example, if we there are no workers running, no matter how many time we request StartWorkflowExecution, no Workflow would actually start.

I'd still recommend folks to upvote this issue if you do need the worker side metric.

tsurdilo commented 10 months ago

I'm not really sure this should be an sdk metric as execution is created on service side if workers are around or not. Would add to service metrics https://github.com/temporalio/temporal/blob/main/common/metrics/metric_defs.go#L884-L889 instead

cretz commented 10 months ago

Has value in both places. This specific request is to track specific-worker workflow starts, not to be used as a general workflow started metric. But I agree in general it has very limited value and anyone could add themselves with an interceptor.