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

refactor(pushsync): better tracing #2520

Merged
merged 1 commit into from
Sep 20, 2021
Merged

refactor(pushsync): better tracing #2520

merged 1 commit into from
Sep 20, 2021

Conversation

acud
Copy link
Member

@acud acud commented Sep 16, 2021

this PR adds traces for replication (on the origin and target nodes) and moves the handler span creation to the right place


This change is Reviewable

@acud acud self-assigned this Sep 16, 2021
@acud acud added the ready for review The PR is ready to be reviewed label Sep 16, 2021
@sonarcloud
Copy link

sonarcloud bot commented Sep 16, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@acud acud requested review from istae and janos September 17, 2021 07:47
Copy link
Member

@janos janos left a comment

Choose a reason for hiding this comment

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

LGTM. One small comment on possible additional improvement.

// decouple the span data from the original context so it doesn't get
// cancelled, then glue the stuff on the new context
span := tracing.FromContext(ctx)

ctx, cancel := context.WithTimeout(context.Background(), timeToWaitForPushsyncToNeighbor)
Copy link
Member

Choose a reason for hiding this comment

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

Since ctx is now passed to pushToNeighbour, could here context.Background() be replaced with ctx?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm passing it just so I can extract the OT span info out of it. The reason we're using context.Background is so that the parent context doesn't expire while we do the replication

@acud acud merged commit 54d2367 into master Sep 20, 2021
@acud acud deleted the pushsync-spans branch September 20, 2021 09:59
@acud acud added this to the v1.2.0 milestone Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull-request ready for review The PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants