Repository navigation
Conversation
|
Before a more in-depth review and test, would you change the cli flag to |
bwplotka
left a comment
There was a problem hiding this comment.
Hello from the Bug Scrub!
This looks ok, just we some last suggestions and rebase.
Allow users to override the default remote write API path (/api/v1/write) when pushing metrics. This is needed for endpoints like Mimir that use /api/v1/push instead. Fixes prometheus#18358 Signed-off-by: Varsha U N <[email protected]>
|
@VarshaUN it looks like the promtool tests are failing now, could you take a look at that? |
Signed-off-by: Varsha U N <[email protected]>
Signed-off-by: Varsha U N <[email protected]>
Hey now the tests have passed , can you review it , Thanks! |
| pushMetricsTimeout := pushMetricsCmd.Flag("timeout", "The time to wait for pushing metrics.").Default("30s").Duration() | ||
| pushMetricsHeaders := pushMetricsCmd.Flag("header", "Prometheus remote write header.").StringMap() | ||
| pushMetricsProtoMsg := pushMetricsCmd.Flag("protobuf_message", "Protobuf message to use when writing (prometheus.WriteRequest or io.prometheus.write.v2.Request).").Default("prometheus.WriteRequest").String() | ||
| pushMetricsAPIPath := pushMetricsCmd.Flag("remote-write.api-path", "Override the default remote write API path (/api/v1/write).").Default("").String() |
There was a problem hiding this comment.
It was previously commented by @bwplotka, but it would be good to have the correct default here. It also ends up being generated and set in the documentation.
| if apiPath != "" { | ||
| apiOpts = append(apiOpts, remoteapi.WithAPIPath(apiPath)) | ||
| } |
There was a problem hiding this comment.
With the correct default set in the command line parameter, we should be safe to always call remoteapi.WithAPIPath and with that we can simplify the code here a bit.
Which issue(s) does the PR fix:
Fixes #18358
Release notes for end users (ALL commits must be considered).
Reviewers should verify clarity and quality.
Signed-off-by : Varsha U N [email protected]