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

fix: Record 0 for headerSize if transferSize is 0 #496

Merged

Conversation

limhjgrace
Copy link
Contributor

The navigation event schema validates that the transferSize field is non-negative. The transferSize field is currently calculated by: headerSize - encodedBodySize. However, headerSize is 0 if it the resource was instantaneously retrieved from a cache. This results in a negative headerSize and thus, an invalid event that is dropped by CWR DP.

This PR adds a check to ensure transferSize is greater than 0 when calculating the headerSize.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@williazz williazz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@limhjgrace limhjgrace merged commit 776915e into aws-observability:main Jan 23, 2024
3 checks passed
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.

None yet

3 participants