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

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

Merged
merged 7 commits into from
Aug 21, 2023

Conversation

kaiyan-sheng
Copy link
Contributor

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

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
Copy link

elasticmachine commented Aug 9, 2023

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

Copy link
Contributor

@zmoog zmoog left a comment

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
Copy link

elasticmachine commented Aug 9, 2023

🌐 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
Contributor 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
@zmoog
Copy link
Contributor

zmoog commented Aug 16, 2023

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
Contributor 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
Contributor 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!!

Copy link
Contributor

@zmoog zmoog left a comment

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.

Copy link
Contributor

@bhapas bhapas left a comment

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
1 check passed
@kaiyan-sheng kaiyan-sheng deleted the rds_metrics branch August 21, 2023 13:49
@elasticmachine
Copy link

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

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.

5 participants