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

Add wrapped tracer implementation #8565

Merged
merged 6 commits into from
Jul 11, 2023

Conversation

suranjay
Copy link
Contributor

@suranjay suranjay commented Jul 10, 2023

Description

This change adds a wrapper tracer implementation.

TracerFactor now returns this wrapped tracer if the telemetry plugin is installed. The wrapped tracer checks the telemetry settings before returning the right tracer object

Related Issues

Resolves #[8561]

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.

suranjay added 2 commits July 10, 2023 13:14
Signed-off-by: suranjay <surajkumar.tu@gmail.com>
Signed-off-by: suranjay <surajkumar.tu@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      2 org.opensearch.indices.replication.RemoteStoreReplicationSourceTests.classMethod
      1 org.opensearch.indices.replication.RemoteStoreReplicationSourceTests.testGetCheckpointMetadata

@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Merging #8565 (260e8a0) into main (e334145) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

❗ Current head 260e8a0 differs from pull request most recent head 9e82feb. Consider uploading reports for the commit 9e82feb to get more accurate results

@@             Coverage Diff              @@
##               main    #8565      +/-   ##
============================================
- Coverage     70.94%   70.89%   -0.06%     
+ Complexity    57001    56970      -31     
============================================
  Files          4758     4759       +1     
  Lines        269417   269374      -43     
  Branches      39420    39408      -12     
============================================
- Hits         191141   190962     -179     
- Misses        62188    62315     +127     
- Partials      16088    16097       +9     
Impacted Files Coverage Δ
...org/opensearch/telemetry/tracing/AbstractSpan.java 100.00% <ø> (ø)
...opensearch/telemetry/tracing/DefaultSpanScope.java 100.00% <ø> (ø)
...rg/opensearch/telemetry/tracing/DefaultTracer.java 95.00% <ø> (ø)
...rg/opensearch/telemetry/tracing/SpanReference.java 0.00% <ø> (ø)
...ensearch/telemetry/tracing/noop/NoopSpanScope.java 12.50% <ø> (ø)
.../opensearch/telemetry/tracing/noop/NoopTracer.java 100.00% <ø> (+33.33%) ⬆️
...pensearch/telemetry/tracing/NoopTracerFactory.java 50.00% <ø> (ø)
...racing/ThreadContextBasedTracerContextStorage.java 30.00% <ø> (ø)
...rg/opensearch/telemetry/tracing/TracerFactory.java 88.88% <100.00%> (+2.22%) ⬆️
...rg/opensearch/telemetry/tracing/WrappedTracer.java 100.00% <100.00%> (ø)

... and 445 files with indirect coverage changes

Signed-off-by: suranjay <surajkumar.tu@gmail.com>
@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: suranjay <surajkumar.tu@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.repositories.azure.AzureBlobContainerRetriesTests.testReadBlobWithRetries

CHANGELOG.md Show resolved Hide resolved
@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:

@reta reta merged commit 7208edc into opensearch-project:main Jul 11, 2023
@reta reta added the backport 2.x Backport to 2.x branch label Jul 11, 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-8565-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 7208edc1832c6be3e8548d01289a88370027e5bb
# Push it to GitHub
git push --set-upstream origin backport/backport-8565-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-8565-to-2.x.

@reta
Copy link
Collaborator

reta commented Jul 11, 2023

@suranjay could you please create manual backport to 2.x? thank you

@suranjay
Copy link
Contributor Author

Sure, on it

suranjay added a commit to suranjay/OpenSearch that referenced this pull request Jul 11, 2023
* Add wrapped tracer implementation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add @opensearch.internal annotation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix test

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

---------

Signed-off-by: suranjay <surajkumar.tu@gmail.com>
@suranjay
Copy link
Contributor Author

Backport 2.x PR: #8622

reta added a commit that referenced this pull request Jul 11, 2023
* Add wrapped tracer implementation



* Add changelog entry



* Add @opensearch.internal annotation



* Fix test



* Fix changelog entry



---------

Signed-off-by: suranjay <surajkumar.tu@gmail.com>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Co-authored-by: Andriy Redko <andriy.redko@aiven.io>
vikasvb90 pushed a commit to raghuvanshraj/OpenSearch that referenced this pull request Jul 12, 2023
* Add wrapped tracer implementation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add @opensearch.internal annotation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix test

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

---------

Signed-off-by: suranjay <surajkumar.tu@gmail.com>
raghuvanshraj pushed a commit to raghuvanshraj/OpenSearch that referenced this pull request Jul 12, 2023
* Add wrapped tracer implementation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add @opensearch.internal annotation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix test

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

---------

Signed-off-by: suranjay <surajkumar.tu@gmail.com>
dzane17 pushed a commit to dzane17/OpenSearch that referenced this pull request Jul 12, 2023
* Add wrapped tracer implementation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add @opensearch.internal annotation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix test

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

---------

Signed-off-by: suranjay <surajkumar.tu@gmail.com>
@suranjay suranjay mentioned this pull request Jul 14, 2023
6 tasks
buddharajusahil pushed a commit to buddharajusahil/OpenSearch that referenced this pull request Jul 18, 2023
* Add wrapped tracer implementation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add @opensearch.internal annotation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix test

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

---------

Signed-off-by: suranjay <surajkumar.tu@gmail.com>
Signed-off-by: sahil buddharaju <sahilbud@amazon.com>
baba-devv pushed a commit to baba-devv/OpenSearch that referenced this pull request Jul 29, 2023
* Add wrapped tracer implementation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add @opensearch.internal annotation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix test

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

---------

Signed-off-by: suranjay <surajkumar.tu@gmail.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
* Add wrapped tracer implementation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Add @opensearch.internal annotation

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix test

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

* Fix changelog entry

Signed-off-by: suranjay <surajkumar.tu@gmail.com>

---------

Signed-off-by: suranjay <surajkumar.tu@gmail.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants