Skip to content

Conversation

axw
Copy link
Member

@axw axw commented Sep 13, 2023

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.asciidoc

  • Update package changelog.yml (only if changes to apmpackage have been made)
    - [ ] Documentation has been updated

How to test these changes

N/A

Related issues

elastic/elasticsearch#97546

@mergify
Copy link
Contributor

mergify bot commented Sep 13, 2023

This pull request does not have a backport label. Could you fix it @axw? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-7.17 is the label to automatically backport to the 7.17 branch.
  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Sep 13, 2023
@axw axw force-pushed the systemtest-es-plugin branch from c39ab5f to 537f2d3 Compare September 13, 2023 13:00
axw added 2 commits September 13, 2023 21:00
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.
@axw axw force-pushed the systemtest-es-plugin branch from 537f2d3 to dec8bb7 Compare September 13, 2023 13:00
@axw axw marked this pull request as ready for review September 14, 2023 04:17
@axw axw requested a review from a team as a code owner September 14, 2023 04:17
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"]
Copy link
Member Author

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,
Copy link
Member Author

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.

@axw axw merged commit 807b1ae into elastic:main Sep 14, 2023
@axw axw deleted the systemtest-es-plugin branch September 14, 2023 07:51
@axw axw added the v8.11.0 label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-skip Skip notification from the automated backport with mergify v8.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants