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) #12223

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

devagarwal1803
Copy link
Contributor

@devagarwal1803 devagarwal1803 commented 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)

Description

[Describe what this change achieves]

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
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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.

…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)
Copy link
Contributor

github-actions bot commented Feb 7, 2024

Compatibility status:

Checks if related components are compatible with change 7bde40a

Incompatible components

Incompatible components: [https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/performance-analyzer.git]

Skipped components

Compatible components

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

Copy link
Contributor

github-actions bot commented Feb 7, 2024

❕ Gradle check result for 7bde40a: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testMultiGetWithNetworkDisruption_FailOpenEnabled
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testSnapshotAndRestore
      1 org.opensearch.remotestore.RemoteIndexPrimaryRelocationIT.testPrimaryRelocationWhileIndexing

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

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 69 lines in your changes are missing coverage. Please review.

Comparison is base (8e79fbe) 71.11% compared to head (7bde40a) 71.12%.
Report is 4 commits behind head on 2.12.

Files Patch % Lines
...ansport/top_queries/TransportTopQueriesAction.java 24.00% 18 Missing and 1 partial ⚠️
.../insights/core/listener/QueryInsightsListener.java 73.58% 10 Missing and 4 partials ⚠️
.../resthandler/top_queries/RestTopQueriesAction.java 61.11% 7 Missing ⚠️
.../telemetry/tracing/sampler/OTelSamplerFactory.java 71.42% 6 Missing ⚠️
.../insights/rules/action/top_queries/TopQueries.java 66.66% 5 Missing ⚠️
...g/sampler/ProbabilisticTransportActionSampler.java 73.68% 3 Missing and 2 partials ⚠️
...search/ingest/common/RemoveByPatternProcessor.java 95.77% 1 Missing and 2 partials ⚠️
...s/rules/action/top_queries/TopQueriesResponse.java 93.18% 3 Missing ⚠️
...rg/opensearch/telemetry/OTelTelemetrySettings.java 77.77% 2 Missing ⚠️
...elemetry/tracing/sampler/ProbabilisticSampler.java 85.71% 1 Missing and 1 partial ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##               2.12   #12223    +/-   ##
==========================================
  Coverage     71.11%   71.12%            
+ Complexity    59761    59760     -1     
==========================================
  Files          4929     4939    +10     
  Lines        281350   281646   +296     
  Branches      41202    41234    +32     
==========================================
+ Hits         200082   200316   +234     
- Misses        64299    64326    +27     
- Partials      16969    17004    +35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sachinpkale sachinpkale merged commit 5be018e into opensearch-project:2.12 Feb 7, 2024
85 of 86 checks passed
@devagarwal1803
Copy link
Contributor Author

Auto backport was failing due, so had raise backport PR manually.

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