Skip to content

Conversation

nanfuka
Copy link
Contributor

@nanfuka nanfuka commented Oct 23, 2022

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (2797)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Contrib Repo Change?

Answer the following question based on these examples of changes that would require a Contrib Repo Change:

  • The OTel specification has changed which prompted this PR to update the method interfaces of opentelemetry-api/ or opentelemetry-sdk/

  • The method interfaces of test/util have changed

  • Scripts in scripts/ that were copied over to the Contrib repo have changed

  • Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in

    • pyproject.toml
    • isort.cfg
    • .flake8
  • When a new .github/CODEOWNER is added

  • Major changes to project information, such as in:

    • README.md
    • CONTRIBUTING.md
  • Yes. - Link to PR:

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@nanfuka nanfuka requested a review from a team October 23, 2022 17:56
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 23, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the scenario we want to cover is to turn default views off and require explicitly turning individual instruments "on" using appropriate aggregation. It will be more complete if you can add a view with aggregation for the insturment.

@nanfuka
Copy link
Contributor Author

nanfuka commented Oct 24, 2022

@srikanthccv this is my understanding of turning default views off
disable_default_views= View(instrument_name="*", aggregation=DropAggregation())

then I added a view with aggregation for the instrument this way

provider = MeterProvider(
metric_readers=[
reader,
],
views=[
disable_default_views,
View(instrument_name="mycounter", aggregation=SumAggregation()),
],
)

Is this what you mean.

@srikanthccv
Copy link
Member

Yes

@srikanthccv
Copy link
Member

Please sign the CLA

@srikanthccv srikanthccv added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Oct 24, 2022
@nanfuka
Copy link
Contributor Author

nanfuka commented Oct 24, 2022

@srikanthccv I have complete signing the CLF

@srikanthccv
Copy link
Member

@nanfuka In the project virtualenv, you can run tox -e lint to see the issues and fix them.

@srikanthccv
Copy link
Member

srikanthccv commented Oct 29, 2022

@nanfuka Please address the comments and fix lint, this otherwise looks good to me.

Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure the example runs without errors.

@lzchen lzchen merged commit d655eb8 into open-telemetry:main Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants