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

MongoDB tracing error upon truncating for specs #674

Closed
Azure7111 opened this issue Jan 17, 2019 · 5 comments
Closed

MongoDB tracing error upon truncating for specs #674

Azure7111 opened this issue Jan 17, 2019 · 5 comments
Assignees
Labels
bug Involves a bug community Was opened by a community member integrations Involves tracing integrations
Projects
Milestone

Comments

@Azure7111
Copy link

I'm currently adding the datadog agent to an app which is truncating its database each time before any specs are run. Although tracing is supposed to be disabled in the test environment the gem still tries to trace the truncation. So trying to run the specs results in the following error:

NoMethodError: undefined method `delete' for nil:NilClass
  /home/redacted/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/ddtrace-0.18.2/lib/ddtrace/contrib/mongodb/subscribers.rb:53:in `failed'

It turns out that this very line was changed in the most recent version (0.18.2), and downgrading to version 0.18.1 makes the issue go away.

@delner
Copy link
Contributor

delner commented Jan 17, 2019

Thanks for the report @Azure7111; do you have a code sample which we can reproduce the issue? Looks like somehow an operation called failed before ever calling started, or the failed event is being handled on a different thread than started, which is not something we anticipated.

Related to #658.

@delner delner self-assigned this Jan 17, 2019
@delner delner added bug Involves a bug integrations Involves tracing integrations community Was opened by a community member labels Jan 17, 2019
@delner
Copy link
Contributor

delner commented Jan 17, 2019

Opened up #675 that might fix this. Can you give it a try @Azure7111?

@delner delner added this to the 0.18.3 milestone Jan 17, 2019
@Azure7111
Copy link
Author

First off let me say that I'm impressed by the quick response. Thanks!

Just gave #675 a try and it works for me! Awesome! :)

Do you still need a code sample in that case?

@delner
Copy link
Contributor

delner commented Jan 17, 2019

@Azure7111 cool, glad to hear it's working.

If you could, it would still be helpful, because I can't say I understand how it called failed before calling started; the gem source code seemed to suggest it always happens in sequence, yet it appears that's not what happened in your application. Having a little extra insight there might help reassure us that the fix is robust enough to prevent this from happening again, or that this issue isn't symptomatic of something bigger.

I'm aiming to put this out with our next bugfix release, 0.18.3, which should hopefully roll today.

@delner
Copy link
Contributor

delner commented Jan 17, 2019

Fix is merged to master, closing this.

@delner delner closed this as completed Jan 17, 2019
@delner delner added this to Resolved/Closed in Active work Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug community Was opened by a community member integrations Involves tracing integrations
Projects
Active work
  
Resolved/Closed
Development

No branches or pull requests

2 participants