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.
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
Metrics export pipeline + metrics stdout exporter #341
Metrics export pipeline + metrics stdout exporter #341
Changes from 22 commits
bbfb6f6
da5a9f4
c783e48
88bdc57
ea77627
07e5bb5
b8e4aed
bb814ec
2f44e84
e7c8eaa
248a793
4ce4ae1
9be693c
f0f302e
8351ef9
4408d94
9db1540
cc862b9
7a5a14d
f9fbd6d
ba41d38
5c2b86e
4e771d6
3af96b7
303fefe
fcb46aa
0ba6611
35697d4
6dfa2b2
9578dba
f4d82e7
a7a9c54
fe44402
d011b8e
6588aee
d99a2a3
1c9d44d
56f68e8
cb51341
b1bfa38
ac1aff9
f135cc8
897a8ba
f73da8d
1619575
6136987
08a5357
5f68832
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI this example is broken now, possibly as a result of #311.
loader.load_impl
expectsapi_type
to be the type of objectfactory
produces (i.e.Meter
) and a the concrete type of object to create (i.e.DefaultMeter
) if the factory is or returns null.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it's metrics_example.py that's broken for this reason. This example has some other problems:
set_preferred_meter_implementation
takes a factory, not a meter instance. This only doesn't cause an error here because this example doesn't callmetrics.meter()
, which should fail with aTypeError
.This example also creates a
Meter
directly instead of usingmetrics.meter()
, which users shouldn't generally do.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added no-op implementations of the metric and handle functions to the default classes so user's who don't have the
meter
loaded would not crash.I agree the usage should be
set_preferred_metered_implementation(lambda _: Meter())
. However this breaks becauseapi_type
isDefaultMeter
here but fails the type check in loader becauseMeter
is not of typeDefaultMeter
.I don't want to include too many loader changes in this PR. As of now, the examples would not work because the loader doesn't seem to be addressing use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the "stateful" example different from the "non-stateful" one in ways other than batcher state?
If the goal is to compare stateful and non-stateful batchers, what do you think about combining these examples to show only that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combining the two examples will require metrics to load a different implementation of
Meter
since aMeter
instance is initialized with a certainBatcher
. The second example can be run after the first sequentially but the example file would get huge and quite confusing to read. I'd prefer to separate the two examples.