-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add metric metadata to message (#102) #112
base: master
Are you sure you want to change the base?
Add metric metadata to message (#102) #112
Conversation
@@ -38,6 +42,8 @@ There is a docker image `telefonica/prometheus-kafka-adapter:1.8.0` [available o | |||
|
|||
Prometheus-kafka-adapter listens for metrics coming from Prometheus and sends them to Kafka. This behaviour can be configured with the following environment variables: | |||
|
|||
- `PROM_METADATA_ENDPOINT`: defines prometheus metric metadata endpoint , not set by default and hence metadata wont be included. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we just made this a boolean instead (e.g. ENABLE_PROM_METADATA
)? Requiring the endpoint may be a bit confusing.
"github.com/sirupsen/logrus" | ||
) | ||
|
||
func GetAllMetricMetadata(promMetaDataEndPoint string, metricsList map[string]MetricMetadata) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels pretty hacky. Is there any way we could instead interface with the metrics object in memory instead of making an internal call?
@@ -6,21 +6,25 @@ Prometheus-kafka-adapter is a service which receives [Prometheus](https://github | |||
|
|||
## output | |||
|
|||
It is able to write JSON or Avro-JSON messages in a kafka topic, depending on the `SERIALIZATION_FORMAT` configuration variable. | |||
It is able to write JSON or Avro-JSON messages in a kafka topic, depending on the `SERIALIZATION_FORMAT` configuration variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean up extra spaces, please.
This PR allows the inclusion of the Metric metadata into the topic and resolves #102 . This is controlled by 2 ENV variables
PROM_METADATA_ENDPOINT
: defines prometheus metric metadata endpoint , not set by default and hence metadata wont be included.INLCUDED_METADATA
: specifies which attributes to be exported. The attributes should be comma separated. Permitted values are type, help and unit. Only type is included by default