Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit 46948ac

Browse files
committed
Add automatic view creation as future possibility
1 parent b01f4dc commit 46948ac

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

text/0089-metrics-views-api.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,3 +251,14 @@ Should the spec include a list of standard aggregations included in the SDK, inc
251251
The spec suggests this now:
252252

253253
> [Other standard aggregations are available, especially for Measure instruments, where we are generally interested in a variety of forms of statistics, such as histogram and quantile summaries.](https://github.com/open-telemetry/opentelemetry-specification/blob/ac75cfea2243ac46232cbc05c595bb0c018e2b58/specification/api-metrics.md#aggregations)
254+
255+
## Future Possibilities
256+
257+
### Automatic view creation
258+
259+
Configuring views for each metric instrument separately requires detailed knowledge about the instrumenting code, including the list of metric instrument names and possible label keys.
260+
One solution for integrations, i.e. libraries that instrument other libraries, is to include a list of default views that the application owner or operator can choose to enable.
261+
See, for example, the [list of default views for the Java OpenCensus gRPC integration](https://github.com/census-instrumentation/opencensus-java/blob/8b1fd5bbf98b27d0ad27394891e0c64c1171cb2b/contrib/grpc_metrics/src/main/java/io/opencensus/contrib/grpc/metrics/RpcViewConstants.java).
262+
263+
This solution doesn't apply to APM vendors, who provide backend-specific exporters and aggregators, and doesn't apply in situations where the instrumentation owner doesn't know _a priori_ which metric instruments need to be registered in views.
264+
We should consider a configuration option that automatically creates a view for each metric instrument with a default aggregation based on its type.

0 commit comments

Comments
 (0)