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

Remove model.Metadata, fold into model.APMEvent #5830

Merged
merged 1 commit into from
Jul 31, 2021

Conversation

axw
Copy link
Member

@axw axw commented Jul 30, 2021

Motivation/summary

Fold model.Metadata's fields directly into model.APMEvent, remove the model.Metadata type. Another step to making the model types look the resulting Elasticsearch docs.

The modelprocessor.MetadataProcessorFunc batch processor has been removed, as model processors that need to act on the common fields can do so without switching on event-specific fields.

modeldecoder.Input now contains a model.APMEvent which serves as the base for any decoded events: each event will take a copy of the Base value, and merge the decoded, event-specific, fields with it.

This PR is otherwise fairly mechanical in updating code to refer to reference the new model.APMEvent fields instead of model.Metadata fields embedded within event-specific types.

Checklist

- [ ] Update CHANGELOG.asciidoc
- [ ] Documentation has been updated

How to test these changes

Non-functional change.

Related issues

#4120
#3565

Finally, fold model.Metadata's fields directly into
model.APMEvent, remove the model.Metadata type, and
adapt ~the entire codebase.

The MetadataProcessorFunc batch processor has been
removed, as model processors that need to act on the
common fields can do so without switching on event-
specific fields.
@apmmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-07-30T03:33:00.031+0000

  • Duration: 39 min 44 sec

  • Commit: f9acc92

Test stats 🧪

Test Results
Failed 0
Passed 5926
Skipped 14
Total 5940

Trends 🧪

Image of Build Times

Image of Tests

@axw axw requested a review from a team July 30, 2021 04:33
@axw axw marked this pull request as ready for review July 30, 2021 04:33
@axw axw merged commit 9d32ab9 into elastic:master Jul 31, 2021
@axw axw deleted the apmevent-metadata branch July 31, 2021 02:05
mergify bot pushed a commit that referenced this pull request Jul 31, 2021
Finally, fold model.Metadata's fields directly into
model.APMEvent, remove the model.Metadata type, and
adapt ~the entire codebase.

The MetadataProcessorFunc batch processor has been
removed, as model processors that need to act on the
common fields can do so without switching on event-
specific fields.

(cherry picked from commit 9d32ab9)
axw added a commit that referenced this pull request Aug 2, 2021
Finally, fold model.Metadata's fields directly into
model.APMEvent, remove the model.Metadata type, and
adapt ~the entire codebase.

The MetadataProcessorFunc batch processor has been
removed, as model processors that need to act on the
common fields can do so without switching on event-
specific fields.

(cherry picked from commit 9d32ab9)

Co-authored-by: Andrew Wilkins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants