-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[exporter/elasticsearch] Add initial support for metrics #33513
[exporter/elasticsearch] Add initial support for metrics #33513
Conversation
c3bdb47
to
19af1ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsolicited review, hope you don't mind :) Looks great, just a few minor comments.
…ticsearch-exporter
…ticsearch-exporter
We don't want cryptographic hashing, we want fast hashing. Using hash/fnv as recommended in [contribution docs](https://github.com/open-telemetry/opentelemetry-collector/blob/v0.102.1/CONTRIBUTING.md#recommended-libraries--defaults). Also changed to hash by uint32 instead of string because I believe that is sufficient. Also added hashing of attribute keys, which was missing. Changed BigEndian to LittleEndian for consistency, although it doesn't really matter.
When any of the documents created for a metrics slice cannot be serialized, reject the whole metrics slice.
Thank you so much @axw for the review, your comments were very helpful! Keep them coming! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'm mildly concerned about using hash/fnv, particularly 32-bit, without any chaining for handling collisions. There's some existing code we can build on, but I think it would be reasonable to defer that to a followup.
…ticsearch-exporter
Co-authored-by: Carson Ip <[email protected]>
Co-authored-by: Carson Ip <[email protected]>
Description:
Adds initial support for metrics. Currently only Sum ang Gauge metric types are supported, other metric types are ignored.
Testing:
Added unit tests.
Documentation:
Added docs in component README.