Avoiding duplicate entries on properties map
Fix #859 Instead of sending out all matching relaxed properties we now pick up one single canonical format and send the data to consumers using it. Formatting settings
This commit is contained in:
committed by
Marius Bogoevici
parent
69cbc7f05b
commit
d78adea895
@@ -1828,8 +1828,6 @@ This module allow operators to collect metrics from stream applications without
|
||||
|
||||
HTTP polling can be challenging on cloud environments since applications could be on a private network or behind a Load balancer that prevents per instance access.
|
||||
|
||||
This module is included on the each of the out of box https://github.com/spring-cloud-stream-app-starters[application starters], if you want to emit metrics from your application, just import it on your pom.xml and follow the activation instructions.
|
||||
|
||||
The module is activated when you set the destination name for its channel, `spring.cloud.stream.bindings.streamMetrics.destination=<DESTINATION_NAME>`.
|
||||
|
||||
By default the module is configured to only send Spring Integration message channel metrics.
|
||||
@@ -1866,6 +1864,35 @@ spring.cloud.stream.bindings.streamMetrics.contentType::
|
||||
+
|
||||
Default: `application/json`
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
Due to Spring Boot's https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-relaxed-binding[relaxed binding] the value of a property being included can be slightly different than the original value.
|
||||
|
||||
As a rule of thumb, the metric exporter will attempt to normalize all the properties in a consistent format using the dot notation (e.g. `JAVA_HOME` becomes `java.home`).
|
||||
|
||||
The goal of normalization is to make downstream consumers of those metrics capable of receiving property names consistently, regardless of how they are set on the monitored application (`--spring.application.name` or `SPRING_APPLICATION_NAME` would always yield `spring.application.name`).
|
||||
|
||||
====
|
||||
|
||||
Below is a sample of data that is pushed to the channel in `application/json` format.
|
||||
|
||||
[source,javascript]
|
||||
----
|
||||
{
|
||||
"name" : "application",
|
||||
"instanceIndex" : 0,
|
||||
"createdTime" : "2017-03-14T13:55:38.547Z",
|
||||
"properties" : {
|
||||
"java.specification.version" : "1.8"
|
||||
}
|
||||
"metrics" : [ {
|
||||
"name" : "mem",
|
||||
"value" : 170757.0,
|
||||
"timestamp" : "2017-03-14T09:55:38.547Z"
|
||||
} ]
|
||||
}
|
||||
----
|
||||
|
||||
== Samples
|
||||
|
||||
For Spring Cloud Stream samples, please refer to the https://github.com/spring-cloud/spring-cloud-stream-samples[spring-cloud-stream-samples] repository on GitHub.
|
||||
|
||||
Reference in New Issue
Block a user