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

Add support for OTEL metrics source to use Kafka buffer #3539

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

kkondaka
Copy link
Collaborator

Description

Add support for OTEL metrics source to use Kafka buffer
Added OTEL Proto Decoder that is instantiated by OTEL metrics source.

Issues Resolved

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • [X ] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

ExportMetricsServiceRequest request = ExportMetricsServiceRequest.parseFrom(inputStream);
AtomicInteger droppedCounter = new AtomicInteger(0);
Collection<Record<? extends Metric>> records =
otelProtoDecoder.parseExportMetricsServiceRequest(request, droppedCounter, OTelProtoCodec.DEFAULT_EXPONENTIAL_HISTOGRAM_MAX_ALLOWED_SCALE, true, true, false);
Copy link
Member

Choose a reason for hiding this comment

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

If I understand this correctly, the pipeline will have different behavior depending on the buffer type. With the in-memory buffer, we place the whole request in the buffer and it is the first object out of the pipeline. With an external buffer, it appears that we are now providing the actual metrics as the first events in the buffer.

I think the pipelines should be consistent between the two buffers. That is, you can swap your buffer without having to change your pipeline structure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't think of any way to make it 100% same. But the YAML file can stay same and it works same.

Signed-off-by: Krishna Kondaka <[email protected]>
@kkondaka kkondaka merged commit bc504fd into opensearch-project:main Nov 9, 2023
42 checks passed
@kkondaka kkondaka deleted the otel-metric-kafka-buffer branch May 13, 2024 05:51
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