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

Support exporting different stats to different exporters. #1195

@evankanderson

Description

@evankanderson

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions