Add metric metadata to message (#102)#112
Open
arunsudhakar wants to merge 4 commits into
Open
Conversation
johnseekins
reviewed
Aug 6, 2023
|
|
||
| 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. |
Contributor
There was a problem hiding this comment.
What if we just made this a boolean instead (e.g. ENABLE_PROM_METADATA)? Requiring the endpoint may be a bit confusing.
johnseekins
reviewed
Aug 6, 2023
| "github.com/sirupsen/logrus" | ||
| ) | ||
|
|
||
| func GetAllMetricMetadata(promMetaDataEndPoint string, metricsList map[string]MetricMetadata) { |
Contributor
There was a problem hiding this comment.
This feels pretty hacky. Is there any way we could instead interface with the metrics object in memory instead of making an internal call?
johnseekins
reviewed
Aug 6, 2023
| ## 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. |
Contributor
There was a problem hiding this comment.
Clean up extra spaces, please.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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