Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Support exporting different stats to different exporters. #1195

Closed
evankanderson opened this issue Feb 2, 2020 · 0 comments · Fixed by #1196
Closed

Support exporting different stats to different exporters. #1195

evankanderson opened this issue Feb 2, 2020 · 0 comments · Fixed by #1196

Comments

@evankanderson
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I'm writing a multi-tenant backend component in Go using the opencensus libraries. I'd like to be able to have separate exporters for the metrics for each resource managed by the multi-tenant service, so that I can (for example) export the stats via OpenCensus with different Resource attributes for each managed resource.

Right now, all the stats aggregation code in stats/view tunnels through a set of singleton resources (defaultWorker and exporters, mostly), which means that statistics are always aggregated only by tags.Tag values, and not segregated by Resource.

Describe the solution you'd like
For advanced use cases, I'd like a mode where I can maintain multiple Views, one for each Resource, with separate aggregation.

Describe alternatives you've considered
We could make this separation by Resource the default, and extend stats.Record and view to also separate by Resource fields as well as by tag. This seems like a more complex change to the library, so I'm inclined to defer it to the OpenTelemetry library, and leave exporting for multiple resources as an advanced use case.

cc @anniefu

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant