Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Merge metrics prototype (metrics_new) into main #2254

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

Merged
merged 7 commits into from
Nov 2, 2021

Conversation

aabmass
Copy link
Member

@aabmass aabmass commented Oct 29, 2021

#2249 made the prototype metrics API/SDK a private package. It can now be merged into main so we don't have to keep a feature branch around.

I cherry-picked the below commits from metrics_new into this branch to remove ugly merge commits, since this PR will not be squashed:

Maintainers: ⚠️ MERGE with "Rebase and Merge" ⚠️

Do not squash and merge, in order to keep history.

ocelotl and others added 6 commits October 29, 2021 18:44
* Adds metric prototype

Fixes open-telemetry#1835

* Fix docs

* Add API metrics doc

* Add missing docs

* Add files

* Adding docs

* Refactor to _initialize

* Refactor initialize

* Add more documentation

* Add exporter test

* Add process

* Fix tests

* Try to add aggregator_class argument

Tests are failing here

* Fix instrument parent classes

* Test default aggregator

* WIP

* Add prototype test

* Tests passing again

* Use right counters

* All tests passing

* Rearrange instrument storage

* Fix tests

* Add HTTP server test

* WIP

* WIP

* Add prototype

* WIP

* Fail the test

* WIP

* WIP

* WIP

* WIP

* Add views

* Discard instruments via views

* Fix tests

* WIP

* WIP

* Fix lint

* WIP

* Fix test

* Fix lint

* Fix method

* Fix lint

* Mypy workaround

* Skip if 3.6

* Fix lint

* Add reason

* Fix 3.6

* Fix run

* Fix lint

* Remove SDK metrics

* Remove SDK docs

* Remove metrics

* Remove assertnotraises mixin

* Revert sdk docs conf

* Remove SDK env var changes

* Fix unit checking

* Define positional-only arguments

* Add Metrics plans

* Add API tests

* WIP

* WIP test

* WIP

* WIP

* WIP

* Set provider test passing

* Use a fixture

* Add test for get_provider

* Rename tests

* WIP

* WIP

* WIP

* WIP

* Remove non specific requirement

* Add meter requirements

* Put all meter provider tests in one file

* Add meter tests

* Make attributes be passed as a dictionary

* Make some interfaces private

* Log an error instead

* Remove ASCII flag

* Add CHANGELOG entry

* Add instrument tests

* All tests passing

* Add test

* Add name tests

* Add unit tests

* Add description tests

* Add counter tests

* Add more tests

* Add Histogram tests

* Add observable gauge tests

* Add updowncounter tests

* Add observableupdowncounter tests

* Fix lint

* Fix docs

* Fix lint

* Ignore mypy

* Remove useless pylint skip

* Remove useless pylint skip

* Remove useless pylint skip

* Remove useless pylint skip

* Remove useless pylint skip

* Add locks to meter and meterprovider

* Add lock to instruments

* Fix fixmes

* Fix lint

* Add documentation placeholder

* Remove blank line as requested.

* Do not override Rlock

* Remove unecessary super calls

* Add missing super calls

* Remove plan files

* Add missing parameters

* Rename observe to callback

* Fix lint

* Rename to secure_instrument_name

* Remove locks

* Fix lint

* Remove args and kwargs

* Remove implementation that gives meters access to meter provider

* Allow creating async instruments with either a callback function or generator

* add additional test with callback form of observable counter

* add a test/example that reads measurements from proc stat

* implement cpu time integration test with generator too

Co-authored-by: Aaron Abbott <[email protected]>
* Make Measurement a concrete class

* comments

* update changelog
* Remove checks and callbacks from API

Fixes open-telemetry#2151

* Fix tests
* Add MeterProvider and Meter to the SDK

Fixes open-telemetry#2200

* Add FIXMEs

* Fix docstring

* Add FIXME

* Fix meter return

* Log an error if a force flush fails

* Add FIXME

* Fix lint

* Remove SDK API module

* Unregister

* Fix API names

* Return _DefaultMeter

* Remove properties

* Pass MeterProvider as a parameter to __init__

* Add FIXMEs

* Add FIXMEs

* Fix lint
* Make metrics api/sdk packages private `*._metrics`

* add warning
@aabmass aabmass marked this pull request as ready for review October 29, 2021 18:58
@aabmass aabmass requested a review from a team October 29, 2021 18:58
@aabmass aabmass added the Approve Public API check This label shows that the public symbols added or changed in a PR are strictly necessary label Nov 1, 2021
@aabmass aabmass requested a review from ocelotl November 1, 2021 20:13
@aabmass aabmass added the PR:please merge This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.) label Nov 1, 2021
@aabmass
Copy link
Member Author

aabmass commented Nov 1, 2021

@open-telemetry/python-maintainers I think this is ready to go in

⚠️ MERGE with "Rebase and Merge"!! do not squash :warning:

@ocelotl ocelotl merged commit 5bc91c8 into open-telemetry:main Nov 2, 2021
@ocelotl
Copy link
Contributor

ocelotl commented Nov 2, 2021

Thanks, @aabmass ✌️

@aabmass aabmass deleted the metrics-new-cherry-pick branch November 22, 2021 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approve Public API check This label shows that the public symbols added or changed in a PR are strictly necessary PR:please merge This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants