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

[Cassandra] Add metric_type mapping for the fields of metrics datastream. #6858

Merged
merged 4 commits into from
Jul 31, 2023

Conversation

ritalwar
Copy link
Contributor

@ritalwar ritalwar commented Jul 7, 2023

  • Enhancement

What does this PR do?

This PR adds metric_type mapping for the fields of metrics datastream.

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.

Related issues

@ritalwar ritalwar requested a review from a team as a code owner July 7, 2023 06:47
@ritalwar ritalwar mentioned this pull request Jul 7, 2023
6 tasks
@elasticmachine
Copy link

elasticmachine commented Jul 7, 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-07-19T07:13:45.935+0000

  • Duration: 16 min 54 sec

Test stats 🧪

Test Results
Failed 0
Passed 11
Skipped 0
Total 11

🤖 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 Jul 7, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 100.0% (1/1) 💚
Classes 100.0% (1/1) 💚
Methods 100.0% (13/13) 💚
Lines 91.228% (52/57) 👎 -8.772
Conditionals 100.0% (0/0) 💚

@ritalwar ritalwar changed the title [Cassandra] Add metric_type mapping for the fields of datastream. [Cassandra] Add metric_type mapping for the fields of metrics datastream. Jul 7, 2023
- name: pending
description: compaction pending tasks.
type: long
metric_type: gauge
- name: dropped_message
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we are not sure that these fields are counter then can we map it as a gauge?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These metrics fall into either the Timer or Meter category, so didn't map it to gauge.
https://cassandra.apache.org/doc/latest/cassandra/operating/metrics.html#dropped-metrics

@lalit-satapathy thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Which metric here is of doubt?

@kush-elastic any pending reviews?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Raised an issue to take care of these fields when there is support for metric_type timer and meter .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After conducting a thorough analysis, I have assigned the metric_type "counter" to these fields. This decision was made based on the fact that there are multiple attributes related to dropped messages, and our pipeline specifically processes the "Count" attribute for all types of dropped messages. It is important to note that the "Count" attribute itself is of type counter.

For further clarification and better understanding, please refer to the link and screenshots.

Screenshot 2023-07-19 at 12 50 44 PM Screenshot 2023-07-19 at 12 51 13 PM

Copy link
Collaborator

Choose a reason for hiding this comment

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

@agithomas, Can you confirm if this mapping is correct?

@ritalwar ritalwar requested a review from agithomas July 25, 2023 05:27
Copy link
Contributor

@agithomas agithomas left a comment

Choose a reason for hiding this comment

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

LGTM, as Richa as validated with Cassandra documentation

@ritalwar ritalwar merged commit ecb7d78 into elastic:main Jul 31, 2023
4 checks passed
@elasticmachine
Copy link

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

gizas pushed a commit that referenced this pull request Sep 5, 2023
…tream. (#6858)

* [Cassandra] Add metric_type mapping for the fields of  datastream.
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.

None yet

6 participants