You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[exporter/prometheusremotewrite] feat: prom rw exporter add support for rw2 (#35888)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Draft PR for adding rw2 support in the prometheus remote write exporter.
Very much a draft, not full implementation of the spec with a lot of
code duplication and no tests WIP.
TODO:
- [x] changelog entry
- [x] feature flag on top of config options
- [x] rip out batching for now
- [x] enum instead of bool for RW2
- [x] update exporter readme
- [x] Validate supported enum value set
- [x] Check for TODOs
- [x] unit tests
- [x] going over the spec and making changes to be rw2 compliant ->
follow up PR
- [x] try to reduce duplicate code
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue #33661
Fixes
<!--Describe what testing was performed and which tests were added.-->
#### Testing
<!--Describe the documentation added.-->
#### Documentation
<!--Please delete paragraphs that you did not use before submitting.-->
---------
Signed-off-by: Juraj Michalek <[email protected]>
Co-authored-by: David Ashpole <[email protected]>
Co-authored-by: Arthur Silva Sens <[email protected]>
Co-authored-by: Bartlomiej Plotka <[email protected]>
# Use this changelog template to create an entry for release notes.
2
+
3
+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4
+
change_type: enhancement
5
+
6
+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7
+
component: prometheusremotewriteexporter
8
+
9
+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10
+
note: Add `exporter.prometheusremotewritexporter.enableSendingRW2` feature gate and configuration to the exporter to send Prometheus remote write 2.0 version.
11
+
12
+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13
+
issues: [33661]
14
+
15
+
# (Optional) One or more lines of additional information to render under the primary note.
16
+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17
+
# Use pipe (|) for multiline entries.
18
+
subtext: WARNING! PRW 2.0 support for the exporter is still under development and not ready for usage.
19
+
20
+
# If your change doesn't affect end users or the exported elements of any package,
21
+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22
+
# Optional: The change log or logs in which this entry should be included.
23
+
# e.g. '[user]' or '[user, api]'
24
+
# Include 'user' if the change is relevant to end users.
25
+
# Include 'api' if there is a change to a library API.
Copy file name to clipboardExpand all lines: exporter/prometheusremotewriteexporter/README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ The following settings can be optionally configured:
51
51
-*Note the following headers cannot be changed: `Content-Encoding`, `Content-Type`, `X-Prometheus-Remote-Write-Version`, and `User-Agent`.*
52
52
-`namespace`: prefix attached to each exported metric name.
53
53
-`add_metric_suffixes`: If set to false, type and unit suffixes will not be added to metrics. Default: true.
54
-
-`send_metadata`: If set to true, prometheus metadata will be generated and sent. Default: false.
54
+
-`send_metadata`: If set to true, prometheus metadata will be generated and sent. Default: false. This option is ignored when using PRW 2.0, which always includes metadata.
55
55
-`remote_write_queue`: fine tuning for queueing and sending of the outgoing remote writes.
56
56
-`enabled`: enable the sending queue (default: `true`)
57
57
-`queue_size`: number of OTLP metrics that can be queued. Ignored if `enabled` is `false` (default: `10000`)
@@ -64,6 +64,11 @@ The following settings can be optionally configured:
64
64
samples to be sent to the remote write endpoint. If the batch size is larger
65
65
than this value, it will be split into multiple batches.
66
66
-`max_batch_request_parallelism` (default = `5`): Maximum parallelism allowed for a single request bigger than `max_batch_size_bytes`.
- Protobuf message to use when writing to the remote write endpoint. This option is ignored unless the `exporter.prometheusremotewritexporter.enableSendingRW2` feature gate is enabled.
69
+
-`prometheus.WriteRequest` is the message used in [Remote Write 1.0](https://prometheus.io/docs/specs/remote_write_spec/).
70
+
-`io.prometheus.write.v2.Request` is the message used in [Remote Write 2.0](https://prometheus.io/docs/specs/remote_write_spec_2_0/). It is more efficient, always includes metadata, and adds support for the created timestamp and native histograms. Your remote storage provider must support PRW 2.0 to be able to use this message. PRW 2.0 support is currently **In Development** and is only partially implemented, thus, not ready for usage.
// SendMetadata controls whether prometheus metadata will be generated and sent
55
+
// SendMetadata controls whether prometheus metadata will be generated and sent, this option is ignored when using PRW 2.0, which always includes metadata.
54
56
SendMetadatabool`mapstructure:"send_metadata"`
57
+
58
+
// RemoteWriteProtoMsg controls whether prometheus remote write v1 or v2 is sent.
0 commit comments