Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd355b2
commit acf71a1
Showing
15 changed files
with
346 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Metrics for Temporal | ||
|
||
## Glossary | ||
|
||
|
||
### Metrics Client | ||
A metrics client is a plain Go object that Temporal server code uses to define metrics and record individual samples. | ||
Temporal defines its own metrics client interface called `metrics.Handler`. However, this interface has several backend | ||
client implementations. | ||
|
||
#### OpenTelemetry client | ||
The OpenTelemetry client provides an interface for defining and recording metrics, called `metrics.Meter`, which | ||
looks something like this: | ||
|
||
```go | ||
type Meter interface { | ||
Int64Counter(name string, options ...Int64CounterOption) (Int64Counter, error) | ||
} | ||
|
||
type Int64Counter interface { | ||
Add(ctx context.Context, incr int64, options ...AddOption) | ||
} | ||
``` | ||
|
||
The OTel client depends on a metrics exporter (the `metric.Reader` interface) to export metrics from the application | ||
to a metrics backend. The only exporter that OTel currently supports is Prometheus (`prometheus.Exporter`). So, by using | ||
OTel, you are coupling your metrics with Prometheus, at least until another exporter is available. | ||
|
||
#### Tally client | ||
The Tally metrics client provides similar functionality to the OTel client, but, in addition to Prometheus, it supports | ||
StatsD, Prometheus and M3 exporter. The metrics client is provided is called `tally.Scope` and looks something like this: | ||
|
||
```go | ||
type Scope interface { | ||
Counter(name string) Counter | ||
} | ||
|
||
type Counter interface { | ||
Inc(delta int64) | ||
} | ||
``` | ||
|
||
### Time Series Database | ||
A time series database (TSDB) is a database optimized for time-stamped or time series data like metrics. Examples | ||
include Prometheus, InfluxDB, Graphite, and OpenTSDB. | ||
|
||
|
||
### Metric Network Protocol | ||
A metric protocol is a protocol for sending metric samples and definitions across a network. Examples include StatsD, | ||
Prometheus, and Graphite. | ||
|
||
|
||
### Metrics Gateway | ||
A metrics gateway is a component that receives metrics from Temporal and forwards them to a time series database. | ||
For example, a StatsD | ||
|
||
### Metrics Reporter | ||
A metrics reporter is a component that reports metrics from Temporal to a time series database. | ||
|
||
#### StatsD Reporter | ||
A StatsD rep | ||
|
||
#### Prometheus Pull-based Reporter | ||
|
||
#### Prometheus Pushgateway Reporter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.