Skip to content

[Backport 2.x] Added custom sampler support based on action in request#12220

Merged
sachinpkale merged 1 commit into2.xfrom
backport/backport-10136-to-2.x
Feb 7, 2024
Merged

[Backport 2.x] Added custom sampler support based on action in request#12220
sachinpkale merged 1 commit into2.xfrom
backport/backport-10136-to-2.x

Conversation

@opensearch-trigger-bot
Copy link
Contributor

Backport 445bf1f from #10136.

* Added custom sampler support based on action in request

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* UT Fix

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

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

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* 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 <devagarwal1803@gmail.com>

* Added missing java-doc

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Moving sampler class settings to OtelTelemetry setting

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Minor refactor

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Refactored to use chain of samplers

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Addressed comments

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Addressed comments to move action_probability to OtelTelemetrySettings

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Updated eror msg returned when Sampler class is not found

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Added UT for OTelSamplerFactory

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* minor refactor

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* minor refactor

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* spotless check

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Updating OtelTelemetryPlugin.get() method

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Addressed comments

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* minor refactor

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* addressed comments

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Updated transport action sampler

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Empty-Commit

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

* Empty-Commit

Signed-off-by: Dev Agarwal <devagarwal1803@gmail.com>

---------

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

github-actions bot commented Feb 7, 2024

Compatibility status:

Checks if related components are compatible with change 0944a1c

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/asynchronous-search.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/sql.git]

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2024

❕ Gradle check result for 0944a1c: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.action.admin.cluster.node.tasks.ResourceAwareTasksTests.testTaskResourceTrackingDuringTaskCancellation

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

@codecov
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

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

Comparison is base (9d279dc) 71.09% compared to head (0944a1c) 71.06%.
Report is 1 commits behind head on 2.x.

Files Patch % Lines
.../telemetry/tracing/sampler/OTelSamplerFactory.java 71.42% 6 Missing ⚠️
...g/sampler/ProbabilisticTransportActionSampler.java 73.68% 3 Missing and 2 partials ⚠️
...rg/opensearch/telemetry/OTelTelemetrySettings.java 77.77% 2 Missing ⚠️
...elemetry/tracing/sampler/ProbabilisticSampler.java 85.71% 1 Missing and 1 partial ⚠️
...arch/telemetry/tracing/sampler/RequestSampler.java 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #12220      +/-   ##
============================================
- Coverage     71.09%   71.06%   -0.03%     
+ Complexity    59784    59769      -15     
============================================
  Files          4936     4938       +2     
  Lines        281518   281574      +56     
  Branches      41211    41218       +7     
============================================
- Hits         200132   200092      -40     
- Misses        64402    64511     +109     
+ Partials      16984    16971      -13     

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

@Gaganjuneja
Copy link
Contributor

Gaganjuneja commented Feb 7, 2024

@sachinpkale Please approve and merge the backport PR.

@sachinpkale sachinpkale merged commit 34dafac into 2.x Feb 7, 2024
@github-actions github-actions bot deleted the backport/backport-10136-to-2.x branch February 7, 2024 05:33
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.

2 participants

Comments