Skip to content

Commit 58e6917

Browse files
timojohloopentelemetrybottiffany76
authored
(docs/internal-telemetry): add example for labels (open-telemetry#7257)
Co-authored-by: opentelemetrybot <[email protected]> Co-authored-by: Tiffany Hrabusa <[email protected]>
1 parent 2743348 commit 58e6917

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

content/en/docs/collector/internal-telemetry.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,25 @@ service:
7171
port: 8888
7272
```
7373

74+
If you want to add additional labels to the Prometheus metrics, you can add them
75+
with `prometheus::with_resource_constant_labels`:
76+
77+
```yaml
78+
prometheus:
79+
host: '0.0.0.0'
80+
port: 8888
81+
with_resource_constant_labels:
82+
included:
83+
- label_key
84+
```
85+
86+
And then reference the labels in `service::telemetry::resource`:
87+
88+
```yaml
89+
resource:
90+
label_key: label_value
91+
```
92+
7493
{{% alert title="Internal telemetry configuration changes" %}}
7594

7695
As of Collector [v0.123.0], the `service::telemetry::metrics::address` setting

0 commit comments

Comments
 (0)