-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[service] add support for views #8247
[service] add support for views #8247
Conversation
95fd037
to
2f15e6a
Compare
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
2f15e6a
to
ead1257
Compare
@@ -163,6 +163,8 @@ func (tel *telemetryInitializer) initMetrics(res *resource.Resource, logger *zap | |||
opts = append(opts, sdkmetric.WithReader(r)) | |||
} | |||
|
|||
opts = append(opts, telemetry.ViewOptionsFromConfig(cfg.Metrics.Views)...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that views are only coming from the user-provided config, and not from components? I understand this is not the final state, but could you add some documentation on how to use this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. I'll have to spend a bit of time trying to figure out how to give components the ability to create their own views.
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
ead1257
to
aaf1093
Compare
One of the issues w/ this change is that a handful of components today configure metric views (using the opencensus registration mechanism available at runtime) wouldn't be able to do so in OTel. Currently there would be no way for a collector component to specify aggregation configuration. This is because there’s no way for components to return views to the service that’s configuring the otel go SDK. Is this something we want components to be able to specify or is this something that should be left to users to configure? There are 5 components (loadbalancingexporter, groupbyattrsprocessor, groupbytraceprocessor, tailsamplingprocessor, batchprocessor) that configure Here are some of the options we have moving forward. Remove component configured views when moving to Otel and only support user configured viewsPro
Con
Leave metrics that require custom aggregation using opencensus.Pro
Con
Add a mechanism for components factories to provide viewsPro
Con
Wait until hints API is available in otel goPro
Con
@jpkrohling any thoughts on the best approach here or alternatives? |
I believe component owners are best positioned to configure how the telemetry should be exposed. I think advanced users might be interested in tweaking this, but I don't think the majority of the users of, say, load-balancing exporter would be willing to configure the views in the config to have the same level of metrics that are being exposed today.
I'd vote for this. It could be an optional interface, and if implemented by components, it's called when the service is configured. |
Other than default buckets for histograms, is there anything else that can be done with views that can't be done with the API itself? If this is going to be obsolete in ~a month when the hint API is added, it seems potentially worth waiting. Views being provided by libraries containing the instrumentation seems to go against their intended purpose. Go already has an RC, so I would expect a stable release in a few weeks. The Edit: aaaaaaand the spec PR is merged. |
This adds support for configuring metric views for internal service telemetry. Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
aaf1093
to
2b18eeb
Compare
@jpkrohling i've filled in a section under the observability doc on how users may enable configuration support. I've not added a section on configuring views specifically, but there is a link to the otel-configuration repo that contains that information. Here's an example of how this could be used:
It sounds like the work to include hints in the API will be unblocked soon, it might be worth waiting for this work to move this views PR forward, WDYT? |
If a long-term solution is around the corner, it does make sense to wait a bit. About the view configuration: is it intended only for advanced use-cases, where users would tweak the telemetry generated by the collector, or is it something that, as a component developer, would have to provide to my users, so that they can use on the collector's config? As an advanced use-case, it looks fine to me. |
@jpkrohling yes I expect this to be a more advanced use-case since the hints API should fulfill the more common needs for components |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
This adds support for configuring metric views for internal service telemetry.
This follows #8119
Related to #3039 #8237 ##7532