-
Notifications
You must be signed in to change notification settings - Fork 83
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
Improve clarity and fix Docs for Logging #69
Comments
I don't think it's possible to get the alias from the context - https://docs.aws.amazon.com/lambda/latest/dg/java-context.html |
I think |
For sampling, I'm happy with the String / Double approach. If this was a public method I think it would be best as a unit. But because it's an environment variable I think it would only increase complexity. |
This is misleading, if we don't know the name, I would assume that is better to default to the
I think the point here is readability, if the argument is called |
W.r.t - service_undefined provides an opportunity for the customer to fix it. Service has also a deeper meaning as it acts as a namespace when looking for data across multiple functions be that logs, metrics or traces. As to context, I don't know about Java, but in the Python context object it'll fetch a FQDN -- If it's a given published version or alias it'll be the last value <function_name>:<version_or_alias> |
I'd be really happy to look at a PR for adding alias information. |
100%, but as soon as a customer incorporates that into multiple functions they will see service_undefined in multiple logstreams, or am I missing something? This goes hand-in-hand with tracing span naming which I'm in full agreement. Now for the Alias, I'm seeking guidance on whether there's any logic behind or simply callee information. |
That is correct - Hence the emphasis on POWERTOOLS_SERVICE_NAME in the docs
for all core utilities, including our blog post and examples.
I’d be happy to log a warning if service name is not found. I would not use
function name as the service name if not found as that will break many
workflows, and their current understanding of service being a namespace
they can search across core utilities too
On the alias bit, it should be easy to test with a deployed function -
Publish a version from the Console, and invoke that function from that
version — It should reflect in the context object, as it’s injected by the
bootstrap runtime process
…On Fri, 4 Sep 2020 at 03:57, Diego Magalhães ***@***.***> wrote:
W.r.t - service_undefined provides an opportunity for the customer to fix
it. Service has also a deeper meaning as it acts as a namespace when
looking for data across multiple functions be that logs, metrics or traces.
100%, but as soon as a customer incorporates that into multiple functions
they will see service_undefined in multiple logstreams, or am I missing
something? This goes hand-in-hand with tracing span naming which I'm in
full agreement.
Now for the Alias, I'm seeking guidance on whether there's any logic
behind or simply callee information.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZPQBFAQ3MSOTX3KQKJCATSEBCQFANCNFSM4QRKWE3A>
.
|
Alias as part of the context was something discussed in the aws-lambda-java-libs project. You might want to continue the discussion there. |
This should be fixed as part of #113 |
@dgomesbr Can this issue be closed now based on some of the discussions above? 🤔 |
For sure. Thank you all! |
What were you initially searching for in the docs?
service_undefined
in Java, use Null or String.Empty.Use units to represent the percentage, clarity over the 0.1. (http://jsr-108.sourceforge.net/javadoc/javax/units/NonSI.html#PERCENT)I'll review the javadocs of it to make it explicitly whether we should be using 0.01, 0.1, 10, etc.Configuration on environment variable is given precedence over sampling rate configuration on annotation, provided it's in valid value range.
Is this related to an existing part of the documentation? Please share a link
https://awslabs.github.io/aws-lambda-powertools-java/core/logging/#standard-structured-keys
Describe how we could make it clearer
Address the points listed
If you have a proposed update, please share it here
The text was updated successfully, but these errors were encountered: