-
Notifications
You must be signed in to change notification settings - Fork 536
Minor changes to support running system tests with x-pack-apm #11638
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
This pull request does not have a backport label. Could you fix it @axw? 🙏
NOTE: |
c39ab5f
to
537f2d3
Compare
If the span or transaction field is missing or null, create a new object rather than omitting the duration.
These are some of the changes needed for the system tests to pass when using the x-pack-apm ES plugin templates and pipelines, rather than the Fleet integration package ones. There are more changes, which we'll add later when we remove the data streams from the integration package.
537f2d3
to
dec8bb7
Compare
var names []string | ||
for _, hit := range result.Hits.Hits { | ||
names = append(names, gjson.GetBytes(hit.RawSource, "error.grouping_name").String()) | ||
values := hit.Fields["error.grouping_name"] |
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.
Note for reviewers: I made this change because in the Elasticserach plugin, we are using a script field which is evaluated at index time. It ends up in fields
, but not in _source
.
source: `{"@timestamp": "2022-02-15", "observer": {"version": "8.2.0"}, "processor": {"event": "transaction"}}`, | ||
// No transaction.* field, no event.duration: set transaction.duration.us to zero. | ||
source: `{"@timestamp": "2022-02-15", "observer": {"version": "8.2.0"}, "processor": {"event": "transaction"}}`, | ||
expectedTransactionDurationUS: 0.0, |
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.
Note for reviewers: there's a small functional change here, which won't actually ever manifest in reality - transactions and spans always have a transaction
or span
object defined.
Motivation/summary
These are some of the changes needed for the system tests to pass when using the x-pack-apm ES plugin templates and pipelines (elastic/elasticsearch#97546), rather than the Fleet integration package ones. There will be more changes needed, which we'll add later when we remove the data streams from the integration package.
Checklist
- [ ] Update CHANGELOG.asciidocapmpackage
have been made)- [ ] Documentation has been updatedHow to test these changes
N/A
Related issues
elastic/elasticsearch#97546