Add start_pipeline to MeterProvider in SDK, atexit moved to MeterProvider#791
Merged
lzchen merged 17 commits intoopen-telemetry:masterfrom Jun 9, 2020
Merged
Add start_pipeline to MeterProvider in SDK, atexit moved to MeterProvider#791lzchen merged 17 commits intoopen-telemetry:masterfrom
lzchen merged 17 commits intoopen-telemetry:masterfrom
Conversation
aabmass
reviewed
Jun 9, 2020
opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py
Outdated
Show resolved
Hide resolved
toumorokoshi
suggested changes
Jun 9, 2020
Member
toumorokoshi
left a comment
There was a problem hiding this comment.
Thanks! The API change looks good to me too: legible.
are there any other examples that should be modified as a result of this?
Also one comment on a loose atexit handler in the actual library code.
ocelotl
suggested changes
Jun 9, 2020
Contributor
ocelotl
left a comment
There was a problem hiding this comment.
Adding a suggestion for default controllers
toumorokoshi
pushed a commit
to toumorokoshi/opentelemetry-python
that referenced
this pull request
Jun 11, 2020
codeboten
pushed a commit
to codeboten/opentelemetry-python
that referenced
this pull request
Jun 11, 2020
srikanthccv
pushed a commit
to srikanthccv/opentelemetry-python
that referenced
this pull request
Nov 1, 2020
* remove Gauge instrument
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses [#750]
Introduces a way to start the collection/export process via
start_pipelineas part of theMeterProvider.See below for usage:
This makes it so that the user does not have to instantiate a
PushControllerinstance themselves (a concept that is quite confusing) and allows the user a mechanism to explicit say when they want to start collecting/exporting metrics. This makes it so that we do not have to worry about any metrics (or views in the future) defined during/after a collection has already started.As well, the
atexitlogic initially part ofPushControllernow belongs to theMeterProvider, which will callshutdownon all controllers and exporters upon application exit.I'm using "pipeline" as the term based off the Go implementation but open to other suggestions.