Logger setup: WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by comparing the Java AWS Lambda sample pom.xml files linked in the issue with the custom-runtime setup and the instrumentation configuration that produces the warning. Reproduce the NoClassDefFoundError and performance warning, then document or verify the required logger setup and confirm that the warning no longer occurs without breaking the application.
Written by the indexing model from the issue text.
Description
Hello @maschnetwork
I'm still trying your setup to get some comparisons. I was trying to apply this to one of my apps. Unfortunately I got NoClassDefFoundError: com/amazonaws/services/lambda/runtime/LambdaLogger - apparently it doesn't like my logger setup. It was working properly without the instrumentation, though.
Anyway, I stepped back to the documentation and according to https://docs.aws.amazon.com/lambda/latest/dg/java-logging.html, this is the basic needed setup: https://github.com/awsdocs/aws-lambda-developer-guide/blob/main/sample-apps/java-basic/pom.xml (or here: https://github.com/awsdocs/aws-lambda-developer-guide/blob/main/sample-apps/blank-java/pom.xml) - does it still apply to custom runtimes?
Unfortunately it looks like I still miss some additional setup because with the instrumentation applied and the above setup I get: WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
The app works fine but from the logs I can see it may impact the performance:
2022-05-09T11:29:15.751+02:00 START RequestId:
2022-05-09T11:29:16.284+02:00 WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. | WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
2022-05-09T11:29:19.403+02:00 END RequestId:
2022-05-09T11:29:19.403+02:00 REPORT RequestId: Duration: 3650.94 ms Billed Duration: 4473 ms Memory Size: 512 MB Max Memory Used: 141 MB Init Duration: 821.08 ms XRAY TraceId: XXX Duration: 3650.94 ms Billed Duration: 4473 ms Memory Size: 512 MB Max Memory Used: 141 MB
Have you encountered this error/warning?
Regards
M
- Dominant language
- Java
- Stars
- 15
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-samples/aws-lambda-java-custom-runtime
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
All issues in aws-samples/aws-lambda-java-custom-runtime
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100