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

fix missing out.* tags when using a mongodb replica set #388

Merged
merged 2 commits into from
Nov 23, 2018

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Nov 21, 2018

This PR fixes missing out.* tags when using a MongoDB replica set. Since the cursor is able to use any topology, it doesn't necessarily have the hostname and port upfront when sending the query. By attempting to set the tags before and after the query, we can ensure that the tags should be set in almost all cases. This issue doesn't apply to the rest of the integration since the Server topology is instrumented directly.

@rochdev rochdev added bug Something isn't working integrations labels Nov 21, 2018
@rochdev rochdev added this to the 0.7.1 milestone Nov 21, 2018
Copy link

@pawelchcki pawelchcki left a comment

Choose a reason for hiding this comment

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

👍

@@ -75,6 +81,10 @@ function wrapCallback (tracer, span, done) {
})
}

if (cursor) {
addHost(span, cursor.server)

Choose a reason for hiding this comment

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

👍

@rochdev rochdev removed the request for review from brettlangdon November 23, 2018 15:07
@rochdev rochdev merged commit 1157128 into master Nov 23, 2018
@rochdev rochdev deleted the fix-mongo-cursor-out-tags branch November 23, 2018 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants