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

[receiver/elasticsearch]: add metrics related to GET operations #14793

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

aboguszewski-sumo
Copy link
Member

@aboguszewski-sumo aboguszewski-sumo commented Oct 10, 2022

Description:
New metrics have been added. However, I think that they're a bit troublesome to add. They are metrics that reflect how many GET operations ended up with success (exists), how many ended up with failure(missing) and time spent on these operations.
Currently (on main) only total sum of these two values is being sent as elasticsearch.node.operations.* metrics with get attribute. This is the main reason why I think that adding them is not easy. I thought up of two solutions that wouldn't be breaking changes:

  • add another values to the existing attribute, eg. get_exists and get_missing - it would not be a breaking change, but I feel that it doesn't look good
  • add another metrics, eg. elasticsearch.node.operations.get.* - it is not consistent with how other metrics are organised, but neither breaks anything. Might seem unintuitive, because then total count would be elasticsearch.node.operations.completed, but total success count would be elasticsearch.node.operations.get.completed.

I implemented the second one, but I'm open for discussion. If we don't mind breaking changes, then we could for example implement the first one and remove the total count, because exists + missing = total.

Link to tracking Issue: #14635

Testing:
Unit tests and integration tests.

Documentation:
Generated by mdatagen.

Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

I agree with the general approach of adding a new metric here. The other metric is focused on the type of operations, whereas this new one is focused on the result of an operation.

receiver/elasticsearchreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/elasticsearchreceiver/metadata.yaml Outdated Show resolved Hide resolved
@aboguszewski-sumo
Copy link
Member Author

This seems outdated:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/9ee4a15478d8d579ad18621173984dd85cb30321/receiver/elasticsearchreceiver/scraper.go#L148
If I'm counting correctly, after adding these new metrics, there are 110 different Record* calls in scrapeNodeMetrics, but some are version dependent etc. so I'm not sure if it's the number we should add.

@aboguszewski-sumo
Copy link
Member Author

Rebased after one test file has been removed.

@aboguszewski-sumo
Copy link
Member Author

The metrics are now disabled by default.

@aboguszewski-sumo aboguszewski-sumo requested review from dmitryax and djaglowski and removed request for djaglowski and dmitryax November 3, 2022 10:09
@djaglowski djaglowski merged commit 6de7397 into open-telemetry:main Nov 3, 2022
dineshg13 pushed a commit to DataDog/opentelemetry-collector-contrib that referenced this pull request Nov 21, 2022
shalper2 pushed a commit to shalper2/opentelemetry-collector-contrib that referenced this pull request Dec 6, 2022
@plantfansam plantfansam mentioned this pull request Jul 21, 2023
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.

3 participants