Skip to content

Use a Timer for the sqsSinkRequestLatency metric to report it with time units#6513

Merged
dlvenable merged 1 commit intoopensearch-project:mainfrom
dlvenable:sqsSinkRequestLatency-timer
Feb 16, 2026
Merged

Use a Timer for the sqsSinkRequestLatency metric to report it with time units#6513
dlvenable merged 1 commit intoopensearch-project:mainfrom
dlvenable:sqsSinkRequestLatency-timer

Conversation

@dlvenable
Copy link
Copy Markdown
Member

Description

This uses a Micrometer Timer for the sqsSinkRequestLatency metrics. This will have it report using time units.

See a similar PR #6510 for more information.

Issues Resolved

N/A

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • 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.

…eports it with correct units.

Signed-off-by: David Venable <dlv@amazon.com>
@dlvenable dlvenable added the breaking change Any change which may break existing configurations and deployments label Feb 13, 2026
pushFailedObjectsToDlq(failedStatus);
} else {
recordLatency((double)System.nanoTime() - startTime);
recordLatency(System.nanoTime() - startTime, TimeUnit.NANOSECONDS);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we use nanoseconds here instead of just milliseconds?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That is the current resolution that we report. So I didn't change it.

But, it shouldn't matter much. Micrometer will send these using units and CloudWatch can normalize them for operators.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok if cloudwatch normalizes then that's good. We should just be seeing consistent numbers for latency on metrics across Data Prepper

@dlvenable dlvenable merged commit 881c965 into opensearch-project:main Feb 16, 2026
73 of 74 checks passed
@dlvenable dlvenable deleted the sqsSinkRequestLatency-timer branch February 16, 2026 22:03
@dlvenable dlvenable added this to the v2.14 milestone Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Any change which may break existing configurations and deployments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants