- Notifications
You must be signed in to change notification settings - Fork 539
fix: cast event.duration to long in event_duration pipeline #9901
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
Conversation
The otel span start/end dates are used to compute the event duration of the APM event, stored as a time.Duration. The duration is converted to nanoseconds stored in an int64 field, however the values is casted to int in the event_duration pipeline leading to an overflow if the original 64 bit value cannot be casted safely to the 32-bit int.
| This pull request does not have a backport label. Could you fix it @kruskall? 🙏
NOTE: |
marclop left a comment
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.
Looks good, thanks for the quick fix. We should backport to 8.6 as well
marclop left a comment
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.
@kruskall can you also add a changelog entry, please?
📚 Go benchmark reportDiff with the report generated with https://pkg.go.dev/golang.org/x/perf/cmd/benchstat |
lahsivjar left a comment
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.
LGTM other than the changelog entry Marc mentioned earlier.
| This pull request is now in conflicts. Could you fix it @kruskall? 🙏 |
| @marclop Added a changelog. Thanks for mentioning that! 🙇 |
* fix: cast event.duration to long in event_duration pipeline The otel span start/end dates are used to compute the event duration of the APM event, stored as a time.Duration. The duration is converted to nanoseconds stored in an int64 field, however the values is casted to int in the event_duration pipeline leading to an overflow if the original 64 bit value cannot be casted safely to the 32-bit int. * test: update otlp system-test to validate duration overflow fix * changelog: add changelog entry (cherry picked from commit f6872f4) # Conflicts: # apmpackage/apm/changelog.yml
…ckport #9901) (#9910) * fix: cast event.duration to long in event_duration pipeline (#9901) * fix: cast event.duration to long in event_duration pipeline The otel span start/end dates are used to compute the event duration of the APM event, stored as a time.Duration. The duration is converted to nanoseconds stored in an int64 field, however the values is casted to int in the event_duration pipeline leading to an overflow if the original 64 bit value cannot be casted safely to the 32-bit int. * test: update otlp system-test to validate duration overflow fix * changelog: add changelog entry (cherry picked from commit f6872f4) # Conflicts: # apmpackage/apm/changelog.yml * changelog: fix conflict and add 8.6 changelog * changelog: fix changelog version 8.6 is not released yet, do not use the explicit version in the changelog file. Co-authored-by: kruskall <99559985+kruskall@users.noreply.github.com>
| do we have the above fix backport to 8.4 version? |
| The bug fix will be part of |
| is there ETA for 8.6 release? we are waiting on this feature to have proper data from open-telemetry for Jenkins pipelines |
Motivation/summary
The otel span start/end dates are used to compute the event
duration of the APM event, stored as a time.Duration.
The duration is converted to nanoseconds stored in an int64
field, however the values is casted to int in the event_duration
pipeline leading to an overflow if the original 64 bit value
cannot be casted safely to the 32-bit int.
Checklist
apmpackagehave been made)For functional changes, consider:
How to test these changes
Related issues
Closes #9780