How to config temporal server prometheus's histogram bucket boundaries?

Topic: We also emit metric on execution stats which also might be useful to get visibility into history sizes/count and setting up alerts.

Hi team, I want to use those metrics to set up alerts about history sizes/count. But the bucket sizes did not align with the limit sizes. The default threshold of history_size_error is 50MB and the default max bucket sizes is 16MB.

I’m wondering how to set the prometheus’s histogram bucket boundaries. If there is a cluster config or dynamic config about it?

find it :slightly_smiling_face:
You can set it in the cluster config.global. e.g:

global:
  membership:
    maxJoinDuration: 30s
    broadcastAddress: "127.0.0.1"
  pprof:
    port: 7936
  metrics:
    perUnitHistogramBoundaries:
      dimensionless:
        - 51200  # the default value of limit.historyCount.error
        - 100000
      milliseconds:
        - 500000
        - 1000000  # 1000s = 16m40s
      bytes:
        - 2097152
        - 4194304
        - 8388608
        - 16777216
        - 52428800  # 50MB: the default value of limit.historySize.error