temporalio / sdk-java

Temporal Java SDK
https://temporal.io
Apache License 2.0
224 stars 147 forks source link

metric not exposed without workersAutoDiscovery property when using spring boot actuator. #2287

Open GwiYeong opened 1 month ago

GwiYeong commented 1 month ago

Expected Behavior

I'm using temporal spring boot io.temporal:temporal-spring-boot-starter:1.25.1 and try to scrape metric from the temporal client. I have two application, one is worker and other is api. Worker application was successfully showing metric(I can get metric from http://localhost:8080/metrics/prometheus but api application could not. After I'm trying to resolve this problem, finally I found one thing. This is my api application properties

spring:
  temporal:
    namespace: local
    connection:
      target: 127.0.0.1:7233

There is no workersAutoDiscovery property that the worker has, because api doesn't need to start the worker, only use workflowClient, so I didn't put the property. After putting the workersAutoDiscovery as dummy, the api application is showing metric (still worker is not started because package is dummy)

spring:
  temporal:
    namespace: local
    connection:
      target: 127.0.0.1:7233
    workersAutoDiscovery:
      packages: dummy

Actual Behavior

Shows the temporal metric to the actuator without the workersAutoDiscovery property.

Steps to Reproduce the Problem

  1. As written above.

Specifications

Quinn-With-Two-Ns commented 1 month ago

just to confirm are you using the client bean to make requests and still not seeing metrics?