aws-samples / aws-samples/aws-lambda-java-custom-runtime

Logger setup: WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.

Ouverte
#3 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
15
Forks
6
Métriques de merge des PR
Aucune PR mergée en 30 j

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par comparer les fichiers pom.xml d’exemple Java AWS Lambda liés dans l’issue avec la configuration custom-runtime et la configuration d’instrumentation qui produisent l’avertissement. Reproduisez le NoClassDefFoundError et l’avertissement de performance, puis documentez ou vérifiez la configuration requise du logger et confirmez que l’avertissement ne se produit plus sans casser l’application.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
aws, java
Domaine
cloud
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.