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
prometheusremotewrite: Don't generate target_info unless at least one identifying label is defined (#32148)
**Description:** <Describe what has changed.>
I propose modifying the Prometheus remote write translator such that it
will only generate the `target_info` metric if at least one identifying
label is defined, i.e. either `job` or `instance` (or both). The
rationale is that without any identifying labels, `target_info` is
useless (you can't join against it).
See [Slack
thread](https://cloud-native.slack.com/archives/C01LSCJBXDZ/p1712161732017409)
for background.
**Testing:** <Describe what testing was performed and which tests were
added.>
I've modified the `addResourceTargetInfo` tests to reflect that at least
one identifying label is required, and added some new ones to cover the
different cases. I also modify a couple of
`prometheusremotewriteexporter` tests that are affected by this change,
as they don't define the identifying resource attributes.
**Documentation:** <Describe the documentation added.>
---------
Signed-off-by: Arve Knudsen <[email protected]>
Co-authored-by: Anthony Mirabella <[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: bug_fix
5
+
6
+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7
+
component: prometheusremotewrite
8
+
9
+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10
+
note: Change prometheusremotewrite.FromMetrics so that the target_info metric is only generated if at least one identifying OTel resource attribute (service.name and/or service.instance.id) is defined.
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: [32148]
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:
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.
0 commit comments