Skip to content

Commit

Permalink
Add notes that label starting with "__" are reserved for internal use…
Browse files Browse the repository at this point in the history
… case only in metrics labels (#12882)

[upstream:a7fb74d050a0d9bee01bcf4fa393d13e94e2235b]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician committed Jan 30, 2025
1 parent 533ca2c commit 5b1ef1a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .changelog/12882.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
monitoring: added more description to make it clear that label starting with "__" are reserved for internal use case only in metrics labels, and cannot be overwritten.
```
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,10 @@ rule group.`,
must be valid.
Label values can be templatized by using variables. The only available
variable names are the names of the labels in the PromQL result, including
"__name__" and "value". "labels" may be empty. This field is intended to be
used for organizing and identifying the AlertPolicy`,
variable names are the names of the labels in the PromQL result,
although label names beginning with \_\_ (two "\_") are reserved for
internal use. "labels" may be empty. This field is intended to be used
for organizing and identifying the AlertPolicy.`,
Elem: &schema.Schema{Type: schema.TypeString},
},
"rule_group": {
Expand Down
7 changes: 4 additions & 3 deletions website/docs/r/monitoring_alert_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,10 @@ The following arguments are supported:
Labels to add to or overwrite in the PromQL query result. Label names
must be valid.
Label values can be templatized by using variables. The only available
variable names are the names of the labels in the PromQL result, including
"__name__" and "value". "labels" may be empty. This field is intended to be
used for organizing and identifying the AlertPolicy
variable names are the names of the labels in the PromQL result,
although label names beginning with \_\_ (two "\_") are reserved for
internal use. "labels" may be empty. This field is intended to be used
for organizing and identifying the AlertPolicy.

* `rule_group` -
(Optional)
Expand Down

0 comments on commit 5b1ef1a

Please sign in to comment.