Skip to content

Commit

Permalink
Basic SCDF Server metrics collection support
Browse files Browse the repository at this point in the history
  - Add influx, prometheus + rsocket-proxy-clinet and wavefront Micrometer meter registry dependencies to SCDF core.
  - Disable the meter registries by default in the dataflow-server-defaults.yml file.
  - Extend the docker-compose-wavefront to enable wavefront metrics collection for the SCDF server along with the Stream and Task apps.
  - Enable the 'http.server.requests' metric by default
  - Add the `spring.cloud.dataflow` prefix to the metric (e.g. metric-name: 'spring.cloud.dataflow.http.server.requests')

 Related to spring-cloud#3937
 Related to spring-cloud#4016

 Resolves spring-cloud#2740
  • Loading branch information
tzolov committed Jul 2, 2020
1 parent 1e15f3d commit c7c0b0e
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<findbugs.version>3.0.2</findbugs.version>
<aws-java-sdk-ecr.version>1.11.731</aws-java-sdk-ecr.version>
<commons-text.version>1.8</commons-text.version>
<prometheus-rsocket-spring.version>0.11.0</prometheus-rsocket-spring.version>
</properties>
<modules>
<module>spring-cloud-dataflow-configuration-metadata</module>
Expand Down Expand Up @@ -257,6 +258,12 @@
<artifactId>jsr305</artifactId>
<version>${findbugs.version}</version>
</dependency>
<dependency>
<groupId>io.micrometer.prometheus</groupId>
<artifactId>prometheus-rsocket-spring</artifactId>
<version>${prometheus-rsocket-spring.version}</version>
</dependency>

</dependencies>
</dependencyManagement>
<build>
Expand Down Expand Up @@ -421,4 +428,4 @@
</pluginRepositories>
</profile>
</profiles>
</project>
</project>
17 changes: 17 additions & 0 deletions spring-cloud-dataflow-server-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@
<artifactId>spring-cloud-dataflow-server-core</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-wavefront</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-influx</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer.prometheus</groupId>
<artifactId>prometheus-rsocket-spring</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dataflow-common-flyway</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
management:
metrics:
web:
server:
request:
autotime:
enabled: true
metric-name: 'spring.cloud.dataflow.http.server.requests'
export:
influx:
enabled: false
prometheus:
enabled: false
wavefront:
enabled: false
endpoints:
web:
base-path: /management
Expand Down
5 changes: 5 additions & 0 deletions spring-cloud-dataflow-server/docker-compose-wavefront.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ version: '3'
services:
dataflow-server:
environment:
- management.metrics.export.wavefront.enabled=true
- management.metrics.export.wavefront.api-token=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!}
- management.metrics.export.wavefront.uri=${WAVEFRONT_URI:-https://vmware.wavefront.com}
- management.metrics.export.wavefront.source=${WAVEFRONT_SOURCE:-scdf-docker-compose}

- spring.cloud.dataflow.applicationProperties.stream.management.metrics.export.wavefront.enabled=true
- spring.cloud.dataflow.applicationProperties.stream.management.metrics.export.wavefront.api-token=${WAVEFRONT_KEY:?WAVEFRONT_KEY is not set!}
- spring.cloud.dataflow.applicationProperties.stream.management.metrics.export.wavefront.uri=${WAVEFRONT_URI:-https://vmware.wavefront.com}
Expand Down

0 comments on commit c7c0b0e

Please sign in to comment.