Skip to content
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

Decide whether to add Resource to Accumulation or keep it in the Processor #1378

Closed
AzfaarQureshi opened this issue Nov 13, 2020 · 1 comment
Labels
1.10.0rc1 release candidate 1 for metrics GA metrics release:required-for-ga To be resolved before GA release sdk Affects the SDK package.

Comments

@AzfaarQureshi
Copy link
Contributor

This issue captures some discussion from the November 12 2020 Python SIG.

According to the spec The Accumulator MUST provide the option to associate a Resource with the Accumulations that it produces.

Currently in the metrics SDK Resource is passed as a field to the processor because the current assumption is that Resource will remain the same across all accumulations. However, moving Resource to Accumulation could enable the Exporter to consume from multiple accumulators while keeping context of which Resource each accumulation is coming from.

The discussion in the SIG concluded that, depending on what the Python community decides, we should either create an issue in the spec to make it optional to add Resource to Accumulation, or make the required changes in our SDK.

@lzchen lzchen added metrics sdk Affects the SDK package. labels Nov 13, 2020
@lzchen
Copy link
Contributor

lzchen commented Nov 13, 2020

Also by definition: Accumulation: consists of Instrument, Label Set, Resource, and Aggregator snapshot, output by Accumulator and we are missing the Resource attribute as part of this class currently.

IMO, we should always adhere to the specs even if they are not set in stone, so we would:

  1. Add Resource to Accumulation.
  2. Remove Resource from Processor.

@codeboten codeboten added release:required-for-ga To be resolved before GA release 1.10.0rc1 release candidate 1 for metrics GA labels Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.10.0rc1 release candidate 1 for metrics GA metrics release:required-for-ga To be resolved before GA release sdk Affects the SDK package.
Projects
None yet
Development

No branches or pull requests

3 participants