Skip to content

add partition timing metrics to LeaderOnlyTokenCrawler#6299

Merged
san81 merged 52 commits into
opensearch-project:mainfrom
wandna-amazon:feature/LeaderOnlyTokenCrawler-metrics
Jan 9, 2026
Merged

add partition timing metrics to LeaderOnlyTokenCrawler#6299
san81 merged 52 commits into
opensearch-project:mainfrom
wandna-amazon:feature/LeaderOnlyTokenCrawler-metrics

Conversation

@wandna-amazon

@wandna-amazon wandna-amazon commented Nov 28, 2025

Copy link
Copy Markdown
Contributor

add missing partition metrics to LeaderOnlyTokenCrawler

aligns LeaderOnlyTokenCrawler metrics with TokenPaginationCrawler as part of the connectors metrics audit (see details)

changes

• added WorkerPartitionWaitTime metric - tracks time partitions wait before processing
• added WorkerPartitionProcessLatency metric - measures actual partition processing time
• updated executePartition() method to record both metrics
• added comprehensive test coverage following existing patterns

benefits

• consistent metrics across both crawler implementations
• better visibility into retry partition performance
• improved observability for partition processing bottlenecks

test results

./gradlew :data-prepper-plugins:saas-source-plugins:source-crawler:test --tests "*testExecutePartitionMetrics*"

OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 7s
51 actionable tasks: 4 executed, 47 up-to-date

BUILD SUCCESSFUL in 7s 51 actionable tasks: 4 executed, 47 up-to-date

revision

• rebased
• refactored metrics to use camel case.

revision 2

  • fixed tests and enforced camel case
./gradlew :data-prepper-plugins:saas-source-plugins:source-crawler:test

> Task :data-prepper-plugins:saas-source-plugins:source-crawler:compileTestJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 39s
51 actionable tasks: 2 executed, 49 up-to-date

###revision 3

Error regarding new RetryHandler code change, quick fix on the test case

./gradlew build
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

> Task :data-prepper-plugins:encryption-plugin:compileTestJava
Note: /Users/wandna/data-prepper/data-prepper-plugins/encryption-plugin/src/test/java/org/opensearch/dataprepper/plugins/encryption/EncryptionPluginTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

> Task :data-prepper-plugins:event-json-codecs:compileTestJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

. . .

BUILD SUCCESSFUL in 19m 14s
1637 actionable tasks: 701 executed, 936 up-to-date


private static final String METRIC_BATCHES_FAILED = "batchesFailed";
private static final String METRIC_BUFFER_WRITE_TIME = "bufferWriteTime";
private static final String WORKER_PARTITION_WAIT_TIME = "WorkerPartitionWaitTime";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should keep the naming consistent with the other metrics (lowerCamelCase in this case).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree however the metric name used in DimensionalTimeSliceCrawler is uppercase naming: link so we can either keep as is, or also make a change to do camel case on DimensionalTimeSliceCrawler metric names.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ahh interesting. Not a big blocker but I think we should move these metricNames to be shared global constants then.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should probably update both.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated in the last commit

@wandna-amazon wandna-amazon force-pushed the feature/LeaderOnlyTokenCrawler-metrics branch from fe99ba4 to 6c5a3bf Compare December 23, 2025 01:00
Signed-off-by: Nathan Wand <wandna@amazon.com>
Convert WorkerPartitionWaitTime and WorkerPartitionProcessLatency metrics
to camelCase format (workerPartitionWaitTime and workerPartitionProcessLatency)
in TokenPaginationCrawler and DimensionalTimeSliceCrawler for consistency
with LeaderOnlyTokenCrawler metrics.

Signed-off-by: Nathan Wand <wandna@amazon.com>
@wandna-amazon wandna-amazon force-pushed the feature/LeaderOnlyTokenCrawler-metrics branch from 29cc05f to b481e84 Compare January 8, 2026 20:26
graytaylor0
graytaylor0 previously approved these changes Jan 8, 2026
san81
san81 previously approved these changes Jan 8, 2026
@san81 san81 self-requested a review January 8, 2026 22:06
@wandna-amazon wandna-amazon dismissed stale reviews from san81 and graytaylor0 via f86f096 January 8, 2026 23:38
wandna-amazon and others added 5 commits January 8, 2026 15:41
Signed-off-by: Nathan Wand <wandna@amazon.com>
Add support for compressed files in FileSource

Signed-off-by: Joël Marty <jmarty@twilio.com>
Signed-off-by: Joël Marty <134835+joelmarty@users.noreply.github.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…-project#6291)

Signed-off-by: Taylor Gray <tylgry@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
* PrometheusTimeSeries performance fixes

Signed-off-by: Kondaka <krishkdk@amazon.com>

* Addressed review comments

Signed-off-by: Kondaka <krishkdk@amazon.com>

* Fixed checkStyle error

Signed-off-by: Kondaka <krishkdk@amazon.com>

---------

Signed-off-by: Kondaka <krishkdk@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…ject#6315)

Bumps software.amazon.awssdk:auth from 2.32.13 to 2.39.5.

---
updated-dependencies:
- dependency-name: software.amazon.awssdk:auth
  dependency-version: 2.39.5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
kkondaka and others added 21 commits January 8, 2026 15:41
…r is used (opensearch-project#6373)

* Support otel metrics source with partition keys when persistent buffer is used

Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>

* Addressed review comments

Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>

* Optimized  splitExportMetricsServiceRequestByKeys

Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>

---------

Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…ject#6390)

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…r. (opensearch-project#6392)

This includes Python scripts for validation as well as a GitHub Action that runs them and comments on PRs if license headers are missing.

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…ch-project#6393)

Signed-off-by: David Venable <dlv@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…pensearch-project#6379)

Bumps [org.apache.logging.log4j:log4j-bom](https://github.com/apache/logging-log4j2) from 2.25.1 to 2.25.3.
- [Release notes](https://github.com/apache/logging-log4j2/releases)
- [Changelog](https://github.com/apache/logging-log4j2/blob/2.x/RELEASE-NOTES.adoc)
- [Commits](apache/logging-log4j2@rel/2.25.1...rel/2.25.3)

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-bom
  dependency-version: 2.25.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…arch-project#6376)

Bumps [org.apache.logging.log4j:log4j-bom](https://github.com/apache/logging-log4j2) from 2.25.1 to 2.25.3.
- [Release notes](https://github.com/apache/logging-log4j2/releases)
- [Changelog](https://github.com/apache/logging-log4j2/blob/2.x/RELEASE-NOTES.adoc)
- [Commits](apache/logging-log4j2@rel/2.25.1...rel/2.25.3)

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-bom
  dependency-version: 2.25.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…pensearch-project#6312)

Bumps org.lz4:lz4-java from 1.8.0 to 1.8.1.

---
updated-dependencies:
- dependency-name: org.lz4:lz4-java
  dependency-version: 1.8.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
Undo a version change caused by dependabot

Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…pensearch-project#6362)

Signed-off-by: Alexander Christensen <alchrisk@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
… Auth Metrics from Metrics Recorder (opensearch-project#6363)

Signed-off-by: Alexander Christensen <alchrisk@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…-project#6364)

Signed-off-by: Alexander Christensen <alchrisk@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
Bumps [org.apache.commons:commons-text](https://github.com/apache/commons-text) from 1.14.0 to 1.15.0.
- [Changelog](https://github.com/apache/commons-text/blob/master/RELEASE-NOTES.txt)
- [Commits](apache/commons-text@rel/commons-text-1.14.0...rel/commons-text-1.15.0)

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-text
  dependency-version: 1.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…ensearch-project#6377)

Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.17.8 to 1.18.3.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](raphw/byte-buddy@byte-buddy-1.17.8...byte-buddy-1.18.3)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-version: 1.18.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…ch (opensearch-project#6378)

Bumps [net.bytebuddy:byte-buddy-agent](https://github.com/raphw/byte-buddy) from 1.17.8 to 1.18.3.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](raphw/byte-buddy@byte-buddy-1.17.8...byte-buddy-1.18.3)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy-agent
  dependency-version: 1.18.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
Signed-off-by: Utkarsh Agarwal <126544832+Utkarsh-Aga@users.noreply.github.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
reponse message updated

Signed-off-by: Sabarinathan Subramanian <22836306+sabarinathan590@users.noreply.github.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…project#6024)

Signed-off-by: Lukas Stehlik <stehlik.lukas@gmail.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…earch-project#6246)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
…-project#6359)

Signed-off-by: eatulban <eatulban@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
@wandna-amazon wandna-amazon force-pushed the feature/LeaderOnlyTokenCrawler-metrics branch from f86f096 to e390d45 Compare January 8, 2026 23:41
Signed-off-by: Nathan Wand <wandna@amazon.com>
@san81 san81 merged commit 033c994 into opensearch-project:main Jan 9, 2026
49 of 52 checks passed
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
…oject#6299)

add partition timing metrics to LeaderOnlyTokenCrawler

Signed-off-by: Simon ELBAZ <elbazsimon9@gmail.com>
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
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.