# Workflow Task metrics only have labels with the workflow\_type=none for the Java SDK

**URL:** <https://community.temporal.io/t/workflow-task-metrics-only-have-labels-with-the-workflow-type-none-for-the-java-sdk/5942>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [September 12, 2022, 11:52am UTC](https://community.temporal.io/t/workflow-task-metrics-only-have-labels-with-the-workflow-type-none-for-the-java-sdk/5942 "2022-09-12T11:52:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrey\_Dubnik](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/andrey_dubnik/32/1498_2.png) [@Andrey\_Dubnik](https://community.temporal.io/u/Andrey_Dubnik)\
**Post date:** [September 12, 2022, 11:52am UTC](https://community.temporal.io/t/workflow-task-metrics-only-have-labels-with-the-workflow-type-none-for-the-java-sdk/5942/1 "2022-09-12T11:52:22Z")

</div>

Hi,

We are using the latest Java SDK and like to get the metrics for the Workflow Task run stats. Unfortunately below metrics (likely some other we don’t know about as well) have `workflow_type=none` and there are no metrics with the `workflow_type=DeliveryWorkflow` label while we were active with the workflow starts and runs.

temporal\_workflow\_task\_queue\_poll\_succeed  
temporal\_workflow\_task\_schedule\_to\_start\_latency\_seconds\_bucket

e.g.

```auto
temporal_workflow_task_schedule_to_start_latency_seconds_bucket{activity_type="none",exception="none",language="java",namespace="sandbox",operation="none",query_type="none",sdk_version="0.0.29",signal_name="none",status_code="none",task_queue="DeliveryAppTaskQueue",temporal_cluster_config="westeurope-01",temporal_environment="dev",temporal_frontend="maersk-composition:///sandbox",worker_type="WorkflowWorker",workflow_type="none",le="0.001",}

```

Similar metrics for the activities have the data populated for the workflow\_type

```auto
temporal_activity_schedule_to_start_latency_seconds_bucket{activity_type="CreateShipping",exception="none",language="java",namespace="sandbox",operation="none",query_type="none",sdk_version="0.0.29",signal_name="none",status_code="none",task_queue="DeliveryAppTaskQueue",temporal_cluster_config="westeurope-01",temporal_environment="dev",temporal_frontend="maersk-composition:///sandbox",worker_type="ActivityWorker",workflow_type="DeliveryWorkflow",le="0.001",} 

```

I wonder if we are missing something in the setup which might cause the workflow\_type to be missing or there is some issue with the SDK metric exporter.

Thanks,  
A

---

<div class="post-metadata">

**Author:** ![antonio.perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/antonio.perez/32/2417_2.png) [@antonio.perez](https://community.temporal.io/u/antonio.perez)\
**Post date:** [September 12, 2022, 4:58pm UTC](https://community.temporal.io/t/workflow-task-metrics-only-have-labels-with-the-workflow-type-none-for-the-java-sdk/5942/3 "2022-09-12T16:58:02Z")

</div>

Hello @Andrey_Dubnik

Thank you for reporting this,

I have filed an issue [Aling information provided by metrics temporal\_activity\_schedule\_to\_start\_latency\_seconds\_bucket and temporal\_workflow\_task\_schedule\_to\_start\_latency\_seconds\_bucket · Issue #1417 · temporalio/sdk-java · GitHub](https://github.com/temporalio/sdk-java/issues/1417) Please feel free to provide more information in the ticket if something is missed.

---

<div class="post-metadata">

**Author:** ![Andrey\_Dubnik](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/andrey_dubnik/32/1498_2.png) [@Andrey\_Dubnik](https://community.temporal.io/u/Andrey_Dubnik)\
**Post date:** [September 12, 2022, 5:37pm UTC](https://community.temporal.io/t/workflow-task-metrics-only-have-labels-with-the-workflow-type-none-for-the-java-sdk/5942/4 "2022-09-12T17:37:01Z")

</div>

Thanks @antonio.perez , will this cover `temporal_workflow_task_queue_poll_succeed` metric as well? As this is also a workflow specific metric without the workflow type populated.

Also a more generic question as currently the metrics are split into 2 groups where it might be actually 3

1. Worker
2. Workflow
3. Client

At the moment worker and workflow metrics are grouped together which may need more clarity in future in the case metric is worker only without distinction between the workflow types and activity types being processed.

---

<div class="post-metadata">

**Author:** ![antonio.perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/antonio.perez/32/2417_2.png) [@antonio.perez](https://community.temporal.io/u/antonio.perez)\
**Post date:** [September 12, 2022, 6:00pm UTC](https://community.temporal.io/t/workflow-task-metrics-only-have-labels-with-the-workflow-type-none-for-the-java-sdk/5942/5 "2022-09-12T18:00:36Z")

</div>

Hi @Andrey_Dubnik

> [@Andrey\_Dubnik](#):
>
> will this cover `temporal_workflow_task_queue_poll_succeed` metric as well? As this is also a workflow specific metric without the workflow type populated.

I have added a comment to the issue, the team will review it.

> [@Andrey\_Dubnik](#):
>
> At the moment worker and workflow metrics are grouped together which may need more clarity in future in the case metric is worker only without distinction between the workflow types and activity types being processed.

You can add custom tags to your metrics per worker so you can filter by those, see this example [https://github.com/temporalio/samples-java/blob/main/src/main/java/io/temporal/samples/metrics/MetricsWorker.java#L47](https://github.com/temporalio/samples-java/blob/main/src/main/java/io/temporal/samples/metrics/MetricsWorker.java#L47)

let me know if that helps

---

<div class="post-metadata">

**Author:** ![Andrey\_Dubnik](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/andrey_dubnik/32/1498_2.png) [@Andrey\_Dubnik](https://community.temporal.io/u/Andrey_Dubnik)\
**Post date:** [September 12, 2022, 7:02pm UTC](https://community.temporal.io/t/workflow-task-metrics-only-have-labels-with-the-workflow-type-none-for-the-java-sdk/5942/6 "2022-09-12T19:02:53Z")

</div>

What I wanted to say is it is not clear from the documentation when the metric is worker/poller specific or a workflow as there is a group of metrics specific to the worker which does not apply to the workflow. We already using the custom worker labels in our setup but it won’t help in the given case.

---

<div class="post-metadata">

**Author:** ![antonio.perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/antonio.perez/32/2417_2.png) [@antonio.perez](https://community.temporal.io/u/antonio.perez)\
**Post date:** [September 13, 2022, 8:48am UTC](https://community.temporal.io/t/workflow-task-metrics-only-have-labels-with-the-workflow-type-none-for-the-java-sdk/5942/7 "2022-09-13T08:48:19Z")

</div>

Got it!

The current clasification is done by the component emitting the metric, client or worker as you have mentioned.

Please feel free to add a comment on the issue we opened before since the team is going to revisit the documentation. I can do it on your behalf if you prefer.
