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] Change SQS metrics statistic method #8521

Merged
merged 4 commits into from Nov 20, 2023

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Nov 15, 2023

Proposed commit message

This PR changes the statistic method that we use to pull SQS cloudwatch metrics.

ApproximateAgeOfOldestMessage: average -> max
NumberOfMessagesDeleted: average -> sum
NumberOfEmptyReceives: average -> sum
NumberOfMessagesReceived: average -> sum
NumberOfMessagesSent: average -> sum

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

@kaiyan-sheng kaiyan-sheng requested a review from a team as a code owner November 15, 2023 22:55
@kaiyan-sheng kaiyan-sheng requested a review from a team as a code owner November 15, 2023 22:56
@kaiyan-sheng kaiyan-sheng self-assigned this Nov 15, 2023
@elasticmachine
Copy link

elasticmachine commented Nov 15, 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-11-16T18:37:56.288+0000

  • Duration: 85 min 28 sec

Test stats 🧪

Test Results
Failed 0
Passed 223
Skipped 3
Total 226

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Nov 15, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (17/17) 💚
Files 94.444% (17/18)
Classes 94.444% (17/18)
Methods 89.701% (270/301)
Lines 86.083% (7571/8795)
Conditionals 100.0% (0/0) 💚

@tommyers-elastic
Copy link
Contributor

totally happy with these changes, but does it matter that the metrics change meaning (and value) all of a sudden for existing users? (i don't see a way round it tbh, but just wondering if we have a way to communicate that something is changing)

@@ -1,4 +1,9 @@
# newer versions go on top
- version: "2.9.1"
Copy link
Member

@shmsr shmsr Nov 16, 2023

Choose a reason for hiding this comment

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

Came here from the related SDH.

It appears that changes made in the PR warrant either a minor or a major version upgrade, instead of a patch upgrade.

Changing statistic method for a few metrics could have implications for backward compatibility, making it more of a breaking change. Therefore, a major upgrade would be more appropriate. What do you think?

Ref: https://semver.org/#summary

Additionally, +1 to Tom's comment.

@kaiyan-sheng
Copy link
Contributor Author

@tommyers-elastic @shmsr I totally understand the concern here. I'm treating it as a bug(with a patch upgrade) because I believe these metrics with the wrong statistic method are not meaningful for users to use. The way to communicate I think will be the changelog. But with more content than just one sentence like what I have right now 😂

Changing statistic method for a few metrics could have implications for backward compatibility, making it more of a breaking change.

Hmm since we have the renaming processor, this change actually will not break the customer on the surface. For sure it will change how the customer uses these metrics.

@tommyers-elastic
Copy link
Contributor

i agree kaiyan - let's just make it clear in the changelog that the meaning of these metrics is changing. i don't mind how we update the version number.

@shmsr
Copy link
Member

shmsr commented Nov 16, 2023

@tommyers-elastic @shmsr I totally understand the concern here. I'm treating it as a bug(with a patch upgrade) because I believe these metrics with the wrong statistic method are not meaningful for users to use. The way to communicate I think will be the changelog. But with more content than just one sentence like what I have right now 😂

Changing statistic method for a few metrics could have implications for backward compatibility, making it more of a breaking change.

Hmm since we have the renaming processor, this change actually will not break the customer on the surface. For sure it will change how the customer uses these metrics.

Got it. Your point is correct too; as it is a bug, a patch upgrade is also fine because we are fixing the bug. But yes, the changelog message should convey that properly.

@kaiyan-sheng
Copy link
Contributor Author

I just updated the changelog with more information and will keep the version to a patch release then. @tommyers-elastic @shmsr Thank you for the review!

@kaiyan-sheng kaiyan-sheng merged commit 98aa53b into elastic:main Nov 20, 2023
4 checks passed
@kaiyan-sheng kaiyan-sheng deleted the sqs_stats branch November 20, 2023 11:08
@elasticmachine
Copy link

Package aws - 2.9.1 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants