-
Notifications
You must be signed in to change notification settings - Fork 515
[envoyproxy][mongodb_atlas] Update failing mappings when validation based on mappings enabled #12577
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
[envoyproxy][mongodb_atlas] Update failing mappings when validation based on mappings enabled #12577
Conversation
1778899 to
959efee
Compare
959efee to
e122783
Compare
e122783 to
e9a1f16
Compare
🚀 Benchmarks reportPackage
|
| Data stream | Previous EPS | New EPS | Diff (%) | Result |
|---|---|---|---|---|
log |
1290.32 | 1028.81 | -261.51 (-20.27%) | 💔 |
Package mongodb_atlas 👍(3) 💚(3) 💔(2)
Expand to view
| Data stream | Previous EPS | New EPS | Diff (%) | Result |
|---|---|---|---|---|
alert |
3115.26 | 2433.09 | -682.17 (-21.9%) | 💔 |
hardware |
17857.14 | 6666.67 | -11190.47 (-62.67%) | 💔 |
To see the full report comment with /test benchmark fullreport
…41bb116f37d13f2d4e04502d0
(cherry picked from commit fa96beb)
a6cf529 to
8771d6c
Compare
| # Is this required to be added ? Or, the Ingest pipeline requires to be revisited? | ||
| - name: thread_local_cluster_manager |
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.
According to the pipeline, thread_local_cluster_manager is a special case:
integrations/packages/envoyproxy/data_stream/stats/elasticsearch/ingest_pipeline/default.yml
Lines 19 to 21 in 9576ef5
| - thread_local_cluster_manager | |
| - cluster_manager | |
| - tls_inspector |
The other two special cases had definitions, but
thread_local_cluster_manager does not.integrations/packages/envoyproxy/data_stream/stats/fields/fields.yml
Lines 1023 to 1112 in 9576ef5
| - name: cluster_manager | |
| type: group | |
| fields: | |
| - name: '*.count' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| metric_type: counter | |
| description: Envoyproxy counters | |
| - name: '*.max' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy max timers metric | |
| - name: '*.mean_rate' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy mean rate timers metric | |
| - name: '*.mean' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy mean timers metric | |
| - name: '*.median' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy median timers metric | |
| - name: '*.min' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy min timers metric | |
| - name: '*.stddev' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy standard deviation timers metric | |
| - name: '*.value' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| metric_type: gauge | |
| description: Envoyproxy gauges | |
| - name: tls_inspector | |
| type: group | |
| fields: | |
| - name: '*.count' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| metric_type: counter | |
| description: Envoyproxy counters | |
| - name: '*.max' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy max timers metric | |
| - name: '*.mean_rate' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy mean rate timers metric | |
| - name: '*.mean' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy mean timers metric | |
| - name: '*.median' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy median timers metric | |
| - name: '*.min' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy min timers metric | |
| - name: '*.stddev' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| description: Envoyproxy standard deviation timers metric | |
| - name: '*.value' | |
| type: object | |
| object_type: double | |
| object_type_mapping_type: "*" | |
| metric_type: gauge | |
| description: Envoyproxy gauges |
In this PR, I've added the definition for that group following the same approach of the other two fields. Is that ok?
Depending on the execution, there are documents ingested with these fields.
| - name: additional_info | ||
| type: flattened |
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.
Previous definition with .* was not matching the fields under additional_info. And therefore all the fields were undefined:
[0] field "mongodb_atlas.project.additional_info._t" is undefined: field definition not found
[1] field "mongodb_atlas.project.additional_info.cid" is undefined: field definition not found
...
In order to be defined as flattened, and therefore all elements under additional_info be mapped as a whole JSON object, it needs to be defined without * to avoid creating a dynamic template (see PR description).
Example of contents of mongodb_atlas.project.additional_info:
{
"severity": "INFO",
"remote_addr": "0.0.0.0",
"is_mms_admin": false,
"hidden": false,
"description": "User was invited to project",
"source": "USER",
"et": "INVITED_TO_GROUP",
"user_id": "sample_user_id",
"_t": "USER_AUDIT",
"cre": "2024-02-21T10:00:29Z",
"un": "[email protected]",
"id": "65d5c9bd2c86e3377aa5e5e4",
"target_username": "[email protected]",
"ut": "LOCAL",
"cid": "646f4379c47da356740d14ad"
}| - version: "0.2.0" | ||
| changes: | ||
| - description: Add field definitions for envoy.thread_local_cluster_manager | ||
| type: enhancement |
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.
Should this be a bugfix instead?
This reverts commit 8771d6c.
.buildkite/scripts/common.sh
Outdated
|
|
||
| list_all_directories() { | ||
| find . -maxdepth 1 -mindepth 1 -type d | xargs -I {} basename {} | sort | ||
| find . -maxdepth 1 -mindepth 1 -type d | xargs -I {} basename {} | sort |grep -E '^(envoyproxy|mongodb_atlas)$' |
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.
To be removed the changes in .buildkite/ folder.
harnish-crest-data
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.
Changes for mongodb_atlas package LGTM! 🚀
kush-elastic
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.
Reviewed envoyproxy.
LGTM
💚 Build Succeeded
History
cc @mrodm |
|
|
Package envoyproxy - 0.2.0 containing this change is available at https://epr.elastic.co/package/envoyproxy/0.2.0/ |
|
Package mongodb_atlas - 0.2.1 containing this change is available at https://epr.elastic.co/package/mongodb_atlas/0.2.1/ |
…ased on mappings enabled (#12577) Updated failing mappings found for "envoyproxy" and "mongodb_atlas" packages when elastic-package uses validation based on mappings in system tests to validate the documents/fields.




Proposed commit message
Updated failing mappings found for
envoyproxyandmongodb_atlaspackages whenelastic-packageuses validation based on mappings.envoyproxy
Added missing mappings for
envoy.thread_local_cluster_managermetrics.Added the same mappings as the other groups (mean, min, max, count and so on).
Example of error found (buildkite link):
mongodb_atlas
Update flattened field definitions to not create dynamic templates.
As they were previously, this dynamic template is created:
With the change of this PR, this mapping is created as:
Example of errors found (buildkite link):
Checklist
changelog.ymlfile.Author's Checklist
elastic-packageenabled mappings: https://buildkite.com/elastic/integrations/builds/21928.buildkitefolder andgo.mod/go.sumfiles.How to test this PR locally
Run elastic-package with mappings validation enabled and run system tests:
Related issues