|
2 | 2 |
|
3 | 3 | ## Micrometer |
4 | 4 |
|
| 5 | +### Metrics |
| 6 | + |
5 | 7 | `data-pipeline` automatically manages a number of micrometer meters in order to give insights into the performance and reliability of a pipeline and its components. |
6 | 8 |
|
7 | 9 | In order to enable activity tracking through micrometer, pass a `io.micrometer.core.instrument.MeterRegistry` to the pipeline builder: |
8 | 10 |
|
9 | 11 | ```java |
10 | 12 | var pipeline = Pipeline.of("my-pipeline") |
11 | 13 | // register steps, sinks, etc. |
12 | | - .setMeterRegistry(meterRegistry) |
| 14 | + .addObservabilityComponent(meterRegistry) |
13 | 15 | //.build() |
14 | 16 | ; |
15 | 17 | ``` |
@@ -51,9 +53,25 @@ Each of these have a number of predefined tags like the `pipeline` name, or a `r |
51 | 53 | | sink | `pipeline.sink.run.failure` | `counter` | `pipeline` `sink` | Total count of failed sink runs | |
52 | 54 | | sink | `pipeline.sink.run.error.total` | `counter` | `pipeline` `sink` `error` | Total count of sink exceptions | |
53 | 55 |
|
| 56 | +### Tracing |
| 57 | + |
| 58 | +`data-pipeline` also manages tracing spans via `micrometer-tracing` on core components: |
| 59 | +* pipeline execution |
| 60 | +* pipeline phases: initialization, steps and sinks |
| 61 | + |
| 62 | +In order to enable tracing through micrometer, pass a `io.micrometer.tracing.Tracer` to the pipeline builder: |
| 63 | + |
| 64 | +```java |
| 65 | +var pipeline = Pipeline.of("my-pipeline") |
| 66 | + // register steps, sinks, etc. |
| 67 | + .addObservabilityComponent(tracer) |
| 68 | + //.build() |
| 69 | +; |
| 70 | +``` |
| 71 | + |
54 | 72 | ## Prometheus |
55 | 73 |
|
56 | | -Given the micrometer integration above, existing meters are trivially converted to prometheus metrics: |
| 74 | +Given the micrometer integration [above](#metrics), existing meters are trivially converted to prometheus metrics: |
57 | 75 | * through `micrometer-registry-prometheus`: [Prometheus integration](https://micrometer.io/docs/registry/prometheus) ; note that there are many alternatives such as [OTLP, Influx, Graphite or Datadog](https://micrometer.io/docs) |
58 | 76 | * or in a spring-boot application for instance: [Production-ready Features - Prometheus](https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.metrics.export.prometheus) |
59 | 77 |
|
|
0 commit comments