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 integration tests support for Telemetry span validation #8444

Merged
merged 27 commits into from
Aug 7, 2023

Conversation

Shephalimittal
Copy link
Contributor

@Shephalimittal Shephalimittal commented Jul 5, 2023

Description

Added cluster Integration tests for Otel span validations in plugins. These tests enable and disable tracer setting and performs following checks on emitted spans.

  • All spans have unique IDs.
  • Number of requests (index/search) equal to Root Parent spans emitted.
  • All spans are closed properly.
  • Number of TraceIDs equal to number of requests.
  • All spans are in order. (Start time of a particular span is after its parent's and its endtime is before its parent's)

Also, added support for telemetryplugin() in IntegTestClass (All integ tests are inherited from this), so basic validations of spans are called in all the tests by default.

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

github-actions bot commented Jul 5, 2023

Gradle Check (Jenkins) Run Completed with:

@Shephalimittal Shephalimittal force-pushed the telemetry-IT-changes branch from c4c77c0 to 4084b27 Compare July 7, 2023 13:04
@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Shephali Mittal <shephalm@amazon.com>
@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



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

BUILD SUCCESSFUL in 29m 39s

Signed-off-by: Shephali Mittal <shephalm@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:



> Task :checkCompatibility
Incompatible components: [https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/security-analytics.git]
Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/geospatial.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/neural-search.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git]

BUILD SUCCESSFUL in 26m 44s

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Shephali Mittal <shephalm@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

Shephali Mittal added 2 commits August 4, 2023 23:41
Signed-off-by: Shephali Mittal <shephalm@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Shephali Mittal <shephalm@amazon.com>
@opensearch-trigger-bot
Copy link
Contributor

Compatibility status:


> Task :checkCompatibility
Checking compatibility for: https://github.com/opensearch-project/reporting.git with ref: main
Incompatible components: [https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/ml-commons.git]
Compatible components: [https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git]

BUILD SUCCESSFUL in 27m 25s

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

Gradle Check (Jenkins) Run Completed with:

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

@reta reta merged commit 70e1b22 into opensearch-project:main Aug 7, 2023
@reta reta added the backport 2.x Backport to 2.x branch label Aug 7, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-8444-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 70e1b2274bf6c1245063442882e561d4fb37742a
# Push it to GitHub
git push --set-upstream origin backport/backport-8444-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-8444-to-2.x.

@reta
Copy link
Collaborator

reta commented Aug 7, 2023

@Shephalimittal could you please send a manual backport to 2.x branch? thank you.

Shephalimittal added a commit to Shephalimittal/OpenSearchJava that referenced this pull request Aug 9, 2023
…idations (opensearch-project#8444)

Signed-off-by: Shephali Mittal <shephalm@amazon.com>
reta pushed a commit that referenced this pull request Aug 9, 2023
…idations (#8444) (#9188)

Signed-off-by: Shephali Mittal <shephalm@amazon.com>
@Gaganjuneja
Copy link
Contributor

Resolves #8430

kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
…arch-project#8444)

* Added integration tests support for Telemetry span validation

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added Telemetry validators

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Build failures

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added changes desciption in changelog.md

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added telemetry featureflagsetting by default to integtestclass

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Renamed Telemetry IT classes and modfied span exporter

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed Logger from InMemorySpanExporter

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Integrated span exporter configurable changes

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Build fixes

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added wrapper on OTel plugin for Integration tests

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed telemetryPlugin() and telemetryFeatureFlagSettings()

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Add support for InMemorySpanExporter class

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removing Unintended change

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removing Tracer factory close

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed vcs.xml file and few other minor changes

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed unintended change

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Changed opentelemetry-sdk-testing dependency scope to test

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Fix integ tests

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Precommit fix

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added TRACER_EXPORTER_DELAY_SETTING, more logging in TelemetryValidators

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed AllSpansAreInOrder validator

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Empty-Commit

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Empty-Commit

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added comment while closing span

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

---------

Signed-off-by: Shephali Mittal <shephalm@amazon.com>
Co-authored-by: Shephali Mittal <shephalm@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
brusic pushed a commit to brusic/OpenSearch that referenced this pull request Sep 25, 2023
…arch-project#8444)

* Added integration tests support for Telemetry span validation

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added Telemetry validators

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Build failures

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added changes desciption in changelog.md

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added telemetry featureflagsetting by default to integtestclass

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Renamed Telemetry IT classes and modfied span exporter

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed Logger from InMemorySpanExporter

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Integrated span exporter configurable changes

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Build fixes

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added wrapper on OTel plugin for Integration tests

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed telemetryPlugin() and telemetryFeatureFlagSettings()

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Add support for InMemorySpanExporter class

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removing Unintended change

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removing Tracer factory close

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed vcs.xml file and few other minor changes

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed unintended change

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Changed opentelemetry-sdk-testing dependency scope to test

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Fix integ tests

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Precommit fix

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added TRACER_EXPORTER_DELAY_SETTING, more logging in TelemetryValidators

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed AllSpansAreInOrder validator

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Empty-Commit

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Empty-Commit

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added comment while closing span

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

---------

Signed-off-by: Shephali Mittal <shephalm@amazon.com>
Co-authored-by: Shephali Mittal <shephalm@amazon.com>
Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…arch-project#8444)

* Added integration tests support for Telemetry span validation

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added Telemetry validators

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Build failures

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added changes desciption in changelog.md

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added telemetry featureflagsetting by default to integtestclass

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Renamed Telemetry IT classes and modfied span exporter

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed Logger from InMemorySpanExporter

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Integrated span exporter configurable changes

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Build fixes

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added wrapper on OTel plugin for Integration tests

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed telemetryPlugin() and telemetryFeatureFlagSettings()

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Add support for InMemorySpanExporter class

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removing Unintended change

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removing Tracer factory close

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed vcs.xml file and few other minor changes

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed unintended change

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Changed opentelemetry-sdk-testing dependency scope to test

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Fix integ tests

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Precommit fix

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added TRACER_EXPORTER_DELAY_SETTING, more logging in TelemetryValidators

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Removed AllSpansAreInOrder validator

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Empty-Commit

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Empty-Commit

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

* Added comment while closing span

Signed-off-by: Shephali Mittal <shephalm@amazon.com>

---------

Signed-off-by: Shephali Mittal <shephalm@amazon.com>
Co-authored-by: Shephali Mittal <shephalm@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
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 skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants