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

Move span operation to Scope from Tracer #8411

Merged
merged 6 commits into from
Jul 5, 2023

Conversation

suranjay
Copy link
Contributor

@suranjay suranjay commented Jul 3, 2023

Description

This PR makes following changes to Tracing framework

  • Move span operation to Scope from Tracer
  • Add span status

###Related Issues
Resolves #8427

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
Copy link
Contributor Author

suranjay commented Jul 3, 2023

@reta Please have a look of the PR when you get chance

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: suranjay <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.snapshots.RestoreSnapshotIT.testRestoreRemoteStoreIndicesWithoutRemoteTranslog
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testNodeDropWithOngoingReplication
      1 org.opensearch.remotestore.RemoteStoreRefreshListenerIT.testRemoteRefreshRetryOnFailure

@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

Merging #8411 (a2ea15a) into main (c9974a4) will decrease coverage by 0.08%.
The diff coverage is 70.96%.

@@             Coverage Diff              @@
##               main    #8411      +/-   ##
============================================
- Coverage     70.94%   70.87%   -0.08%     
+ Complexity    57000    56892     -108     
============================================
  Files          4758     4759       +1     
  Lines        269186   269189       +3     
  Branches      39399    39399              
============================================
- Hits         190968   190781     -187     
- Misses        62148    62322     +174     
- Partials      16070    16086      +16     
Impacted Files Coverage Δ
...ava/org/opensearch/telemetry/tracing/OTelSpan.java 90.00% <0.00%> (-10.00%) ⬇️
...ensearch/telemetry/tracing/noop/NoopSpanScope.java 12.50% <12.50%> (ø)
...opensearch/telemetry/tracing/DefaultSpanScope.java 100.00% <100.00%> (ø)
...rg/opensearch/telemetry/tracing/DefaultTracer.java 95.00% <100.00%> (-2.15%) ⬇️
...va/org/opensearch/telemetry/tracing/SpanScope.java 100.00% <100.00%> (ø)
.../opensearch/telemetry/tracing/noop/NoopTracer.java 66.66% <100.00%> (+41.66%) ⬆️

... and 458 files with indirect coverage changes

@reta
Copy link
Collaborator

reta commented Jul 4, 2023

@suranjay @Gaganjuneja seems like folks you are have conflicting changes #8357

@suranjay
Copy link
Contributor Author

suranjay commented Jul 4, 2023

@suranjay @Gaganjuneja seems like folks you are have conflicting changes #8357

Yes, we will rebase the other PR changes which gets merged earlier

@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: suranjay <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      2 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testNodeDropWithOngoingReplication
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testDropPrimaryDuringReplication
      1 org.opensearch.index.IndexServiceTests.testAsyncTranslogTrimTaskOnClosedIndex

Copy link
Member

@shwetathareja shwetathareja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @suranjay for the refactoring the SpanScope class.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: suranjay <[email protected]>
@suranjay
Copy link
Contributor Author

suranjay commented Jul 5, 2023

@suranjay @Gaganjuneja seems like folks you are have conflicting changes #8357

Yes, we will rebase the other PR changes which gets merged earlier

Merged changes from @Gaganjuneja commit. @reta Please have a look when you get chance

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testNodeDropWithOngoingReplication
      1 org.opensearch.indices.replication.SegmentReplicationRelocationIT.testPrimaryRelocation

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

suranjay added a commit to suranjay/OpenSearch that referenced this pull request Jul 7, 2023
* Move span operation to Scope from Tracer

Signed-off-by: suranjay <[email protected]>

* Add changelog entry

Signed-off-by: suranjay <[email protected]>

* Change method to setError

Signed-off-by: suranjay <[email protected]>

* Removed unused classes

Signed-off-by: suranjay <[email protected]>

* Fix merge issue

Signed-off-by: suranjay <[email protected]>

---------

Signed-off-by: suranjay <[email protected]>
reta pushed a commit that referenced this pull request Jul 7, 2023
)

* Move span operation to Scope from Tracer (#8411)

* Move span operation to Scope from Tracer

Signed-off-by: suranjay <[email protected]>

* Add changelog entry

Signed-off-by: suranjay <[email protected]>

* Change method to setError

Signed-off-by: suranjay <[email protected]>

* Removed unused classes

Signed-off-by: suranjay <[email protected]>

* Fix merge issue

Signed-off-by: suranjay <[email protected]>

---------

Signed-off-by: suranjay <[email protected]>

* Empty-Commit

Signed-off-by: suranjay <[email protected]>

---------

Signed-off-by: suranjay <[email protected]>
vikasvb90 pushed a commit to raghuvanshraj/OpenSearch that referenced this pull request Jul 12, 2023
* Move span operation to Scope from Tracer

Signed-off-by: suranjay <[email protected]>

* Add changelog entry

Signed-off-by: suranjay <[email protected]>

* Change method to setError

Signed-off-by: suranjay <[email protected]>

* Removed unused classes

Signed-off-by: suranjay <[email protected]>

* Fix merge issue

Signed-off-by: suranjay <[email protected]>

---------

Signed-off-by: suranjay <[email protected]>
raghuvanshraj pushed a commit to raghuvanshraj/OpenSearch that referenced this pull request Jul 12, 2023
* Move span operation to Scope from Tracer

Signed-off-by: suranjay <[email protected]>

* Add changelog entry

Signed-off-by: suranjay <[email protected]>

* Change method to setError

Signed-off-by: suranjay <[email protected]>

* Removed unused classes

Signed-off-by: suranjay <[email protected]>

* Fix merge issue

Signed-off-by: suranjay <[email protected]>

---------

Signed-off-by: suranjay <[email protected]>
buddharajusahil pushed a commit to buddharajusahil/OpenSearch that referenced this pull request Jul 18, 2023
* Move span operation to Scope from Tracer

Signed-off-by: suranjay <[email protected]>

* Add changelog entry

Signed-off-by: suranjay <[email protected]>

* Change method to setError

Signed-off-by: suranjay <[email protected]>

* Removed unused classes

Signed-off-by: suranjay <[email protected]>

* Fix merge issue

Signed-off-by: suranjay <[email protected]>

---------

Signed-off-by: suranjay <[email protected]>
Signed-off-by: sahil buddharaju <[email protected]>
baba-devv pushed a commit to baba-devv/OpenSearch that referenced this pull request Jul 29, 2023
* Move span operation to Scope from Tracer

Signed-off-by: suranjay <[email protected]>

* Add changelog entry

Signed-off-by: suranjay <[email protected]>

* Change method to setError

Signed-off-by: suranjay <[email protected]>

* Removed unused classes

Signed-off-by: suranjay <[email protected]>

* Fix merge issue

Signed-off-by: suranjay <[email protected]>

---------

Signed-off-by: suranjay <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
* Move span operation to Scope from Tracer

Signed-off-by: suranjay <[email protected]>

* Add changelog entry

Signed-off-by: suranjay <[email protected]>

* Change method to setError

Signed-off-by: suranjay <[email protected]>

* Removed unused classes

Signed-off-by: suranjay <[email protected]>

* Fix merge issue

Signed-off-by: suranjay <[email protected]>

---------

Signed-off-by: suranjay <[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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tracing Framework] Extend the functionality of Scope returned from startSpan.
3 participants