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

Added custom sampler support based on action in request #10136

Conversation

devagarwal1803
Copy link
Contributor

@devagarwal1803 devagarwal1803 commented Sep 20, 2023

Description

Added custom sampler support based on action in request

Related Issues

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

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@devagarwal1803 devagarwal1803 changed the title Added custom sampler support based on action in request [Draft] Added custom sampler support based on action in request Sep 20, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

Compatibility status:

Checks if related components are compatible with change 9c3380d

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/performance-analyzer.git]

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.RemoteStoreStatsIT.testStatsResponseAllShards

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Dev Agarwal <[email protected]>
Signed-off-by: Dev Agarwal <[email protected]>
Signed-off-by: Dev Agarwal <[email protected]>
Signed-off-by: Dev Agarwal <[email protected]>
Signed-off-by: Dev Agarwal <[email protected]>
Signed-off-by: Dev Agarwal <[email protected]>
Copy link
Contributor

github-actions bot commented Feb 7, 2024

❌ Gradle check result for bbb454b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Feb 7, 2024

❌ Gradle check result for b01ba80: TIMEOUT

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Dev Agarwal <[email protected]>
Copy link
Contributor

github-actions bot commented Feb 7, 2024

❕ Gradle check result for 9c3380d: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationAllocationIT.testSingleIndexShardAllocation

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@sachinpkale
Copy link
Member

No actual changes post the last maintainer approval (rebase was done to fix a failing test not related to the PR)

@sachinpkale sachinpkale merged commit 445bf1f into opensearch-project:main Feb 7, 2024
29 of 30 checks passed
@Gaganjuneja
Copy link
Contributor

No actual changes post the last maintainer approval (rebase was done to fix a failing test not related to the PR)

Thanks @sachinpkale

@sachinpkale sachinpkale added backport 2.x Backport to 2.x branch backport 2.12 Backport to 2.12 branch labels Feb 7, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 7, 2024
* Added custom sampler support based on action in request

Signed-off-by: Dev Agarwal <[email protected]>

* UT Fix

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions. Also added setting to define order of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Added missing java-doc

Signed-off-by: Dev Agarwal <[email protected]>

* Moving sampler class settings to OtelTelemetry setting

Signed-off-by: Dev Agarwal <[email protected]>

* Minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* Refactored to use chain of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments to move action_probability to OtelTelemetrySettings

Signed-off-by: Dev Agarwal <[email protected]>

* Updated eror msg returned when Sampler class is not found

Signed-off-by: Dev Agarwal <[email protected]>

* Added UT for OTelSamplerFactory

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* spotless check

Signed-off-by: Dev Agarwal <[email protected]>

* Updating OtelTelemetryPlugin.get() method

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Updated transport action sampler

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

---------

Signed-off-by: Dev Agarwal <[email protected]>
(cherry picked from commit 445bf1f)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.12 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.12 2.12
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.12
# Create a new branch
git switch --create backport/backport-10136-to-2.12
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 445bf1f6313016e59d7f63ba7725e7088cb83ba3
# Push it to GitHub
git push --set-upstream origin backport/backport-10136-to-2.12
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.12

Then, create a pull request where the base branch is 2.12 and the compare/head branch is backport/backport-10136-to-2.12.

sachinpkale pushed a commit that referenced this pull request Feb 7, 2024
)

* Added custom sampler support based on action in request



* UT Fix



* Added Transport action sampler, which will sample based on different probability for all actions



* Added Transport action sampler, which will sample based on different probability for all actions. Also added setting to define order of samplers



* Added missing java-doc



* Moving sampler class settings to OtelTelemetry setting



* Minor refactor



* Refactored to use chain of samplers



* Addressed comments



* Addressed comments to move action_probability to OtelTelemetrySettings



* Updated eror msg returned when Sampler class is not found



* Added UT for OTelSamplerFactory



* minor refactor



* minor refactor



* spotless check



* Updating OtelTelemetryPlugin.get() method



* Addressed comments



* minor refactor



* addressed comments



* Updated transport action sampler



* Empty-Commit



* Empty-Commit



---------


(cherry picked from commit 445bf1f)

Signed-off-by: Dev Agarwal <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
devagarwal1803 added a commit to devagarwal1803/OpenSearch that referenced this pull request Feb 7, 2024
…roject#10136)

* Added custom sampler support based on action in request

Signed-off-by: Dev Agarwal <[email protected]>

* UT Fix

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions. Also added setting to define order of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Added missing java-doc

Signed-off-by: Dev Agarwal <[email protected]>

* Moving sampler class settings to OtelTelemetry setting

Signed-off-by: Dev Agarwal <[email protected]>

* Minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* Refactored to use chain of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments to move action_probability to OtelTelemetrySettings

Signed-off-by: Dev Agarwal <[email protected]>

* Updated eror msg returned when Sampler class is not found

Signed-off-by: Dev Agarwal <[email protected]>

* Added UT for OTelSamplerFactory

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* spotless check

Signed-off-by: Dev Agarwal <[email protected]>

* Updating OtelTelemetryPlugin.get() method

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Updated transport action sampler

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

---------

Signed-off-by: Dev Agarwal <[email protected]>
(cherry picked from commit 445bf1f)
sachinpkale pushed a commit that referenced this pull request Feb 7, 2024
)

* Added custom sampler support based on action in request

Signed-off-by: Dev Agarwal <[email protected]>

* UT Fix

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions. Also added setting to define order of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Added missing java-doc

Signed-off-by: Dev Agarwal <[email protected]>

* Moving sampler class settings to OtelTelemetry setting

Signed-off-by: Dev Agarwal <[email protected]>

* Minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* Refactored to use chain of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments to move action_probability to OtelTelemetrySettings

Signed-off-by: Dev Agarwal <[email protected]>

* Updated eror msg returned when Sampler class is not found

Signed-off-by: Dev Agarwal <[email protected]>

* Added UT for OTelSamplerFactory

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* spotless check

Signed-off-by: Dev Agarwal <[email protected]>

* Updating OtelTelemetryPlugin.get() method

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Updated transport action sampler

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

---------

Signed-off-by: Dev Agarwal <[email protected]>
(cherry picked from commit 445bf1f)
peteralfonsi pushed a commit to peteralfonsi/OpenSearch that referenced this pull request Mar 1, 2024
…roject#10136)

* Added custom sampler support based on action in request

Signed-off-by: Dev Agarwal <[email protected]>

* UT Fix

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions. Also added setting to define order of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Added missing java-doc

Signed-off-by: Dev Agarwal <[email protected]>

* Moving sampler class settings to OtelTelemetry setting

Signed-off-by: Dev Agarwal <[email protected]>

* Minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* Refactored to use chain of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments to move action_probability to OtelTelemetrySettings

Signed-off-by: Dev Agarwal <[email protected]>

* Updated eror msg returned when Sampler class is not found

Signed-off-by: Dev Agarwal <[email protected]>

* Added UT for OTelSamplerFactory

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* spotless check

Signed-off-by: Dev Agarwal <[email protected]>

* Updating OtelTelemetryPlugin.get() method

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Updated transport action sampler

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

---------

Signed-off-by: Dev Agarwal <[email protected]>
rayshrey pushed a commit to rayshrey/OpenSearch that referenced this pull request Mar 18, 2024
…roject#10136)

* Added custom sampler support based on action in request

Signed-off-by: Dev Agarwal <[email protected]>

* UT Fix

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions. Also added setting to define order of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Added missing java-doc

Signed-off-by: Dev Agarwal <[email protected]>

* Moving sampler class settings to OtelTelemetry setting

Signed-off-by: Dev Agarwal <[email protected]>

* Minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* Refactored to use chain of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments to move action_probability to OtelTelemetrySettings

Signed-off-by: Dev Agarwal <[email protected]>

* Updated eror msg returned when Sampler class is not found

Signed-off-by: Dev Agarwal <[email protected]>

* Added UT for OTelSamplerFactory

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* spotless check

Signed-off-by: Dev Agarwal <[email protected]>

* Updating OtelTelemetryPlugin.get() method

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Updated transport action sampler

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

---------

Signed-off-by: Dev Agarwal <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…roject#10136)

* Added custom sampler support based on action in request

Signed-off-by: Dev Agarwal <[email protected]>

* UT Fix

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions

Signed-off-by: Dev Agarwal <[email protected]>

* Added Transport action sampler, which will sample based on different probability for all actions. Also added setting to define order of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Added missing java-doc

Signed-off-by: Dev Agarwal <[email protected]>

* Moving sampler class settings to OtelTelemetry setting

Signed-off-by: Dev Agarwal <[email protected]>

* Minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* Refactored to use chain of samplers

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments to move action_probability to OtelTelemetrySettings

Signed-off-by: Dev Agarwal <[email protected]>

* Updated eror msg returned when Sampler class is not found

Signed-off-by: Dev Agarwal <[email protected]>

* Added UT for OTelSamplerFactory

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* spotless check

Signed-off-by: Dev Agarwal <[email protected]>

* Updating OtelTelemetryPlugin.get() method

Signed-off-by: Dev Agarwal <[email protected]>

* Addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* minor refactor

Signed-off-by: Dev Agarwal <[email protected]>

* addressed comments

Signed-off-by: Dev Agarwal <[email protected]>

* Updated transport action sampler

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

---------

Signed-off-by: Dev Agarwal <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch backport 2.12 Backport to 2.12 branch backport-failed v2.12.0 Issues and PRs related to version 2.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants