-
Notifications
You must be signed in to change notification settings - Fork 90
feat: Metrics utility #91
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
Conversation
4307dd9
to
3b7c97c
Compare
79e9306
to
1f46b59
Compare
...oftware/amazon/lambda/powertools/metrics/handlers/PowertoolsMetricsEnabledStreamHandler.java
Show resolved
Hide resolved
I'll write some Javadocs. |
} | ||
|
||
private String namespace(PowertoolsMetrics powertoolsMetrics) { | ||
return !"".equals(powertoolsMetrics.namespace()) ? powertoolsMetrics.namespace() : NAMESPACE; |
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.
What is the default namespace if neither the annotation parameter or environment variable are set?
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.
This should probably match the "service_undefined" functionality.
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 dont see python version sets any defaults either https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/aws_lambda_powertools/metrics/base.py#L90
return metricsLogger; | ||
} | ||
|
||
public static void withSingleMetric(final String name, |
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.
Did you leave the service out on purpose?
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.
Yeah made the API consistent with python one here https://awslabs.github.io/aws-lambda-powertools-python/core/metrics/#creating-a-metric-with-a-different-dimension
c3120b5
to
e0db6bc
Compare
For some reason which I am not able to figure out yet, java doc plugin fails with error as below on java9 and 10.
|
This commit enables validations as well like mentioned here https://awslabs.github.io/aws-lambda-powertools-python/core/metrics/#flushing-metrics. Which means its full feature parity now with python version. |
3c56e17
to
79ac8d2
Compare
Quick question: How often does these get reviewed? And how long can these reviews take? I ask because I'm wondering if I should integrate with the EMF java library, or wait for this PR to get reviewed and merged? |
Hi Kassandra, This should be released soon. |
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.
Approved
Issue #, if available:
Description of changes:
EMF logging support
Checklist
Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.