Skip to content
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

added regex support and improved retrying #192

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

willarmiros
Copy link
Contributor

Added standard Java regex support to the trace templates we use for validation. Benefit is that for auto-generated strings like Lambda functions created with SAM, we can match partially for the deterministic portion of the name and regex match the random part. This can also let us check for the mere presence of fields in the retrieved trace even if we don't know what their values would be, by including the field with a value of * in the template. The drawbacks are that regex characters (*, ?, .) will now need to be escaped if we want to match them literally, which I've done by adding \\ for all existing periods (.) in the templates.

I've also changed the retry logic so that there are 2 levels of retries - at the top level we have 2 retries to call the sample app and generate trace data to handle the Lambda case where the first invocation might be a cold start and have an undesired extra subsegment. Inside that we have 5 retries to get trace data from the X-Ray service to ensure all expected segments are able to be retrieved. I've verified this works with the Lambda cold start and X-Ray SDK trace validations.

Also a couple other minor bug fixes.

@wyTrivail wyTrivail merged commit 1318917 into aws-observability:terraform Dec 10, 2020
wyTrivail added a commit that referenced this pull request Dec 10, 2020
mxiamxia pushed a commit that referenced this pull request Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants