Skip to content

[AWS] Fix field names for rds remove processor - #7331

Merged
kaiyan-sheng merged 7 commits into
elastic:mainfrom
kaiyan-sheng:rds_metrics
Aug 21, 2023
Merged

[AWS] Fix field names for rds remove processor#7331
kaiyan-sheng merged 7 commits into
elastic:mainfrom
kaiyan-sheng:rds_metrics

Conversation

@kaiyan-sheng

@kaiyan-sheng kaiyan-sheng commented Aug 9, 2023

Copy link
Copy Markdown

What does this PR do?

This pr is to drop the remove processor because it's not doing any actual work since the rename processor already changes the fields name.

@kaiyan-sheng
kaiyan-sheng requested a review from a team as a code owner August 9, 2023 22:47
@elasticmachine

elasticmachine commented Aug 9, 2023

Copy link
Copy Markdown

💚 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: 2023-08-17T19:39:38.915+0000

  • Duration: 49 min 24 sec

Test stats 🧪

Test Results
Failed 0
Passed 208
Skipped 4
Total 212

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@zmoog zmoog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaiyan-sheng Why do we need to remove the same field we're renaming? In which case the rename is not enough?

@elasticmachine

elasticmachine commented Aug 9, 2023

Copy link
Copy Markdown

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (17/17) 💚
Files 94.444% (17/18)
Classes 94.444% (17/18)
Methods 85.953% (257/299)
Lines 86.024% (7509/8729)
Conditionals 100.0% (0/0) 💚
@kaiyan-sheng

Copy link
Copy Markdown
Author

@kaiyan-sheng Why do we need to remove the same field we're renaming? In which case the rename is not enough?

We rename it and then remove the original field name. So we don't report the same data point twice :)

@kaiyan-sheng
kaiyan-sheng requested a review from a team as a code owner August 11, 2023 13:46
@kaiyan-sheng kaiyan-sheng self-assigned this Aug 16, 2023
@kaiyan-sheng
kaiyan-sheng requested a review from zmoog August 16, 2023 18:40
@zmoog

zmoog commented Aug 16, 2023

Copy link
Copy Markdown
Contributor

We rename it and then remove the original field name. So we don't report the same data point twice :)

Yeah, I get it.

What I meant was, for example, why do we need to remove the field aws.rds.metrics.AuroraVolumeBytesLeftTotal.avg when renaming it makes it go away?

#
# request
#

POST _ingest/pipeline/metrics-aws.rds-1.42.0/_simulate
{
  "docs": [
    {
      "_source": {
        "@timestamp": "2022-10-04T13:05:22.643+1300",
        "aws": {
          "rds": {
            "metrics": {
              "AuroraVolumeBytesLeftTotal": {
                "avg": 0
              }
            }
          }
        }
      }
    }
  ]
}
#
# response
#

{
  "docs": [
    {
      "doc": {
        "_index": "_index",
        "_id": "_id",
        "_version": "-3",
        "_source": {
          "aws": {
            "rds": {
              "aurora_volume_left_total": {
                "bytes": 0
              },
              "metrics": {}
            }
          },
          "@timestamp": "2022-10-04T13:05:22.643+1300"
        },
        "_ingest": {
          "timestamp": "2023-08-16T21:28:27.25249272Z"
        }
      }
    }
  ]
}
@kaiyan-sheng

Copy link
Copy Markdown
Author

@zmoog Ahh sorry I completely misunderstood you! Thanks for the comment!! This is interesting! I didnt know rename processor also removes the old field! Let me double check tomorrow then :)

@kaiyan-sheng

Copy link
Copy Markdown
Author

@zmoog you are right! The renamed processors deleted the old fields after done renaming. So I will change this PR to actually remove the remove processor then 😂 THANK YOU!!

@zmoog zmoog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we are dropping the remove processor because it's not doing any actual work since the rename processor already changes the fields name.

LGTM.

@bhapas bhapas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kaiyan-sheng
kaiyan-sheng merged commit 3906382 into elastic:main Aug 21, 2023
@kaiyan-sheng
kaiyan-sheng deleted the rds_metrics branch August 21, 2023 13:49
@elasticmachine

Copy link
Copy Markdown

Package aws - 1.53.2 containing this change is available at https://epr.elastic.co/search?package=aws

orestisfl pushed a commit to orestisfl/integrations that referenced this pull request May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

5 participants