Skip to content

Commit

Permalink
merge(#1255): made Cadence metrics reporters mutex
Browse files Browse the repository at this point in the history
Made Cadence metrics reporter services mutually exclusive
#1255
  • Loading branch information
pregnor authored May 31, 2021
2 parents 3cddf77 + 0d10543 commit 4122ffa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cadence/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cadence
version: 0.18.0
version: 0.19.0
appVersion: 0.20.0
description: Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
icon: https://raw.githubusercontent.com/uber/cadence-web/master/client/assets/logo.svg
Expand Down
13 changes: 13 additions & 0 deletions cadence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,19 @@ and create a domain:
docker run --rm ubercadence/cli:master --address host.docker.internal:7933 --domain samples-domain domain register --global_domain false
```

## Metrics

Note: from chart version 0.19.0, the metrics collection services (Prometheus,
StatsD) are mutually exclusive - only one of those can be enabled at the same
time based on the values configuration. The default configuration enables
Prometheus.

If you want to enable StatsD (and disable Prometheus), you may edit the global
metrics configuration values accordingly. If you want to use them in a mixed
fashion, make sure to disable both in the global metrics configuration values
and enable the desired one in the service-specific configuration values (this is
required, because global configurations take precedence over service-specific
configurations).

## Configuration

Expand Down
12 changes: 8 additions & 4 deletions cadence/templates/server-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ data:
metrics:
tags:
type: frontend
{{- if or .Values.server.metrics.prometheus .Values.server.frontend.metrics.prometheus }}
prometheus:
timerType: {{ default .Values.server.metrics.prometheus.timerType .Values.server.frontend.metrics.prometheus.timerType }}
listenAddress: "0.0.0.0:9090"
{{- if or .Values.server.metrics.statsd .Values.server.frontend.metrics.statsd }}
{{- else if or .Values.server.metrics.statsd .Values.server.frontend.metrics.statsd }}
statsd:
hostPort: {{ default .Values.server.metrics.statsd.hostPort .Values.server.frontend.metrics.statsd.hostPort | quote }}
prefix: {{ `{{ default .Env.STATSD_FRONTEND_PREFIX "cadence.frontend" }}` }}
Expand All @@ -99,10 +100,11 @@ data:
metrics:
tags:
type: history
{{- if or .Values.server.metrics.prometheus .Values.server.frontend.metrics.prometheus }}
prometheus:
timerType: {{ default .Values.server.metrics.prometheus.timerType .Values.server.history.metrics.prometheus.timerType }}
listenAddress: "0.0.0.0:9090"
{{- if or .Values.server.metrics.statsd .Values.server.history.metrics.statsd }}
{{- else if or .Values.server.metrics.statsd .Values.server.history.metrics.statsd }}
statsd:
hostPort: {{ default .Values.server.metrics.statsd.hostPort .Values.server.history.metrics.statsd.hostPort | quote }}
prefix: {{ `{{ default .Env.STATSD_HISTORY_PREFIX "cadence.history" }}` }}
Expand All @@ -115,10 +117,11 @@ data:
metrics:
tags:
type: matching
{{- if or .Values.server.metrics.prometheus .Values.server.frontend.metrics.prometheus }}
prometheus:
timerType: {{ default .Values.server.metrics.prometheus.timerType .Values.server.matching.metrics.prometheus.timerType }}
listenAddress: "0.0.0.0:9090"
{{- if or .Values.server.metrics.statsd .Values.server.matching.metrics.statsd }}
{{- else if or .Values.server.metrics.statsd .Values.server.matching.metrics.statsd }}
statsd:
hostPort: {{ default .Values.server.metrics.statsd.hostPort .Values.server.matching.metrics.statsd.hostPort | quote }}
prefix: {{ `{{ default .Env.STATSD_FRONTEND_PREFIX "cadence.matching" }}` }}
Expand All @@ -131,10 +134,11 @@ data:
metrics:
tags:
type: worker
{{- if or .Values.server.metrics.prometheus .Values.server.frontend.metrics.prometheus }}
prometheus:
timerType: {{ default .Values.server.metrics.prometheus.timerType .Values.server.worker.metrics.prometheus.timerType }}
listenAddress: "0.0.0.0:9090"
{{- if or .Values.server.metrics.statsd .Values.server.worker.metrics.statsd }}
{{- else if or .Values.server.metrics.statsd .Values.server.worker.metrics.statsd }}
statsd:
hostPort: {{ default .Values.server.metrics.statsd.hostPort .Values.server.worker.metrics.statsd.hostPort | quote }}
prefix: {{ `{{ default .Env.STATSD_WORKER_PREFIX "cadence.worker" }}` }}
Expand Down

0 comments on commit 4122ffa

Please sign in to comment.