-
Notifications
You must be signed in to change notification settings - Fork 98
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
Issue: 289 - Adding GraalVM native-image support. #311
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[ | ||
{ | ||
"name": "com.amazonaws.xray.handlers.config.AWSServiceHandlerManifest", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.handlers.config.AWSOperationHandlerManifest", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.handlers.config.AWSOperationHandler", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.handlers.config.AWSOperationHandlerRequestDescriptor", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.handlers.config.AWSOperationHandlerResponseDescriptor", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
[ | ||
{ | ||
"name": "com.amazonaws.xray.AWSXRay", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.strategy.sampling.manifest.SamplingRuleManifest", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.strategy.sampling.rule.SamplingRule", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.strategy.sampling.reservoir.Reservoir", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.strategy.sampling.reservoir.Reservoir$MaxFunction", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it matter that these static nested classes are package-private? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, they have to be added individually. |
||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.strategy.sampling.reservoir.Reservoir$LessThan10", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.strategy.sampling.reservoir.Reservoir$AtLeast10", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.auth.AWS4Signer", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.entities.ThrowableDescription", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.entities.SubsegmentImpl", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.entities.EntityImpl", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.entities.TraceID", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.entities.Cause", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.amazonaws.xray.entities.SegmentImpl", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
}, | ||
{ | ||
"name": "com.fasterxml.jackson.databind.ser.std.ToStringSerializer", | ||
"allPublicMethods": true, | ||
"allPublicConstructors": true, | ||
"allDeclaredFields": true, | ||
"allDeclaredMethods": true, | ||
"allDeclaredConstructors": true | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"resources" : { | ||
"includes" : [ { | ||
"pattern" : "\\Qcom/amazonaws/xray/interceptors/DefaultOperationParameterWhitelist.json\\E" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pattern attribute is a Java regexp that matches resource(s) to be included in the image from https://www.graalvm.org/reference-manual/native-image/Resources/ I imagine this was created using the tracing agent so might have an auto generated feel :) |
||
}, { | ||
"pattern" : "\\Qcom/amazonaws/xray/sdk.properties\\E" | ||
}, { | ||
"pattern" : "\\Qcom/amazonaws/xray/strategy/sampling/DefaultSamplingRules.json\\E" | ||
}, { | ||
"pattern" : "\\Qsoftware/amazon/awssdk/global/handlers/execution.interceptors\\E" | ||
}, { | ||
"pattern" : "\\Qsoftware/amazon/awssdk/services/s3/execution.interceptors\\E" | ||
} ] | ||
}, | ||
"bundles" : [ ] | ||
} |
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 have the same question here that @anuraaga had in the original issue, to quote him:
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 check I understand the question. Do you believe that this is never accessed via reflection? and isn't required?
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.
Yes that is my understanding, but I could be wrong. I guess the author of these configs probably listed all these classes based on experimentation. If that's the case, then it's fine, just. interesting that some part of this logic (probably via Jackson) ends up accessing this class reflectively.
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 tested the config with this project https://github.com/aws-samples/serverless-graalvm-demo/tree/aws-xray-support and it was successful. That doesn't mean it isn't a false positive. I'll test it tomorrow.
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.
Sounds good, if removing them causes your test to fail then it's fine to leave as-is
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.
Test failed without.