Skip to content

Commit d42a63c

Browse files
codebotenopentelemetrybottiffany76
authored
add view configuration documentation (open-telemetry#7267)
Signed-off-by: alex boten <[email protected]> Co-authored-by: opentelemetrybot <[email protected]> Co-authored-by: Tiffany Hrabusa <[email protected]>
1 parent 8a5b880 commit d42a63c

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,29 @@ service:
129129
level: detailed
130130
```
131131

132+
You can further configure how metrics from the Collector are emitted by using
133+
[`views`](/docs/specs/otel/metrics/sdk/#view). For example, the following
134+
configuration updates the metric named `otelcol_process_uptime` to emit a new
135+
name `process_uptime` and description:
136+
137+
```yaml
138+
service:
139+
telemetry:
140+
metrics:
141+
views:
142+
- selector:
143+
instrument_name: otelcol_process_uptime
144+
instrument_type:
145+
stream:
146+
name: process_uptime
147+
description: The amount of time the Collector has been up
148+
```
149+
150+
You can also use `views` to update the resulting aggregation, attributes, and
151+
cardinality limits. For the full list of options, see the examples in the
152+
OpenTelemetry Configuration schema
153+
[repository](https://github.com/open-telemetry/opentelemetry-configuration/blob/f4e9046682d4386ea533ef7ba6ad30a5ce4451b4/examples/kitchen-sink.yaml#L440).
154+
132155
### Configure internal logs
133156

134157
Log output is found in `stderr`. You can configure logs in the config

static/refcache.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7807,6 +7807,10 @@
78077807
"StatusCode": 200,
78087808
"LastSeen": "2025-02-06T02:13:12.345Z"
78097809
},
7810+
"https://github.com/open-telemetry/opentelemetry-configuration/blob/f4e9046682d4386ea533ef7ba6ad30a5ce4451b4/examples/kitchen-sink.yaml#L440": {
7811+
"StatusCode": 206,
7812+
"LastSeen": "2025-07-07T22:46:42.063381936Z"
7813+
},
78107814
"https://github.com/open-telemetry/opentelemetry-configuration/blob/main/CONTRIBUTING.md#property-name-case": {
78117815
"StatusCode": 200,
78127816
"LastSeen": "2025-05-14T16:28:12.345Z"
@@ -10963,6 +10967,10 @@
1096310967
"StatusCode": 206,
1096410968
"LastSeen": "2025-02-06T02:17:59.999Z"
1096510969
},
10970+
"https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#view": {
10971+
"StatusCode": 206,
10972+
"LastSeen": "2025-07-07T22:46:40.456342004Z"
10973+
},
1096610974
"https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#spankind": {
1096710975
"StatusCode": 200,
1096810976
"LastSeen": "2025-03-21T21:16:12.345Z"

0 commit comments

Comments
 (0)