-
Notifications
You must be signed in to change notification settings - Fork 1
Initial commit for wavefront wrapper for dispatch #1
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
base: master
Are you sure you want to change the base?
Conversation
imikushin
left a comment
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.
Just a couple questions
|
|
||
| ## Standard Metrics reported by Wavefront Dispatch wrapper | ||
|
|
||
| Following metrics will be reported by wrapper: |
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.
The table looks screwed up, like this:
Following metrics will be reported by wrapper:
| Metric Name | Type | Description |
|---|---|---|
| dispatch.function.wf.invocations.count | Delta Counter | Count of Dispatch function invocations |
| dispatch.function.wf.errors.count | Delta Counter | Count of Dispatch function executions with error |
| dispatch.function.wf.duration.value | Gauge | Execution time of Dispatch function in ms. |
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 did insert extract spaces and dashes for alignments with table header and contents. I will delete those extra spaces since the final rendering markdown are the same.
| def handle(ctx, payload): | ||
|
|
||
| # Customized metrics | ||
| registry = wavefront_dispatch.get_registry() |
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.
We're getting an instance of registry every time a function gets invoked. Is that intentional (recommended / required)?
If not, it better be initialized once and reused.
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.
The registry is MetricsRegistry which only contains various maps of metrics types. My understanding is that the registry is for keeping track of current metrics during execution and should not be expensive. It has to be created every time for new function invocation.
pip install wavefront_dispatchhttps://pypi.org/project/wavefront-dispatch/