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

Move model value normalisation to modeldecoder #5784

Merged
merged 1 commit into from
Jul 23, 2021

Conversation

axw
Copy link
Member

@axw axw commented Jul 22, 2021

Motivation/summary

When modeldecoder decodes numbers and stores them in interface{} fields, it has been storing them as json.Numbers and we would later convert these to numbers during model transformation. As this logic is specific to how modeldecoder decodes, and not to any other inputs (e.g. OTLP), move this "normalisation" logic to modeldecoder.

Checklist

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

How to test these changes

Non-functional change.

Related issues

#4120
#3565

When modeldecoder decodes numbers and stores them
in interface{} fields, it has been storing them as
json.Numbers and we would convert these to numbers
during model transformation. As this is specific to
modeldecoder and not any other inputs (e.g. OTLP),
move this "normalisation" logic to modeldecoder.
@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-22T06:33:37.156+0000

  • Duration: 39 min 18 sec

  • Commit: 0774e67

Test stats 🧪

Test Results
Failed 0
Passed 5965
Skipped 14
Total 5979

Trends 🧪

Image of Build Times

Image of Tests

@axw axw marked this pull request as ready for review July 22, 2021 07:28
@axw axw requested a review from a team July 22, 2021 07:28
@axw axw merged commit 6211be6 into elastic:master Jul 23, 2021
@axw axw deleted the modeldecoder-value-normalization branch July 23, 2021 01:39
mergify bot pushed a commit that referenced this pull request Jul 23, 2021
When modeldecoder decodes numbers and stores them
in interface{} fields, it has been storing them as
json.Numbers and we would convert these to numbers
during model transformation. As this is specific to
modeldecoder and not any other inputs (e.g. OTLP),
move this "normalisation" logic to modeldecoder.

(cherry picked from commit 6211be6)
axw added a commit that referenced this pull request Jul 26, 2021
When modeldecoder decodes numbers and stores them
in interface{} fields, it has been storing them as
json.Numbers and we would convert these to numbers
during model transformation. As this is specific to
modeldecoder and not any other inputs (e.g. OTLP),
move this "normalisation" logic to modeldecoder.

(cherry picked from commit 6211be6)

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