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

Handle NameError during profiler initialization #1552

Merged
merged 2 commits into from
Jun 10, 2021

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Jun 9, 2021

In #1545 a user reported a NameError during profiler initialization.

I wasn't able to reproduce the issue, but I've added a small check and a nicer message in case it comes back to ask users to report the issue to us, and that avoids breaking their application.

Issue #1545

In #1545 a user reported a NameError during profiler initialization.

I wasn't able to reproduce the issue, but I've added a small check and
a nicer message in case it comes back to ask users to report the issue
to us, and that avoids breaking their application.

Issue #1545
@ivoanjo ivoanjo requested a review from a team June 9, 2021 13:32
ericmustin
ericmustin previously approved these changes Jun 9, 2021
Copy link
Contributor

@ericmustin ericmustin left a comment

Choose a reason for hiding this comment

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

feel free to disregard my comment, just a suggestion, otherwise lgtm

@ivoanjo ivoanjo merged commit 50e2f8e into master Jun 10, 2021
@ivoanjo ivoanjo deleted the ivoanjo/handle-nameerror-during-initialization branch June 10, 2021 13:07
@github-actions github-actions bot added this to the 0.51.0 milestone Jun 10, 2021
@ivoanjo
Copy link
Member Author

ivoanjo commented Jan 5, 2023

Update: Another customer ran into this issue a few weeks back and got the "Profiling was marked as supported and enabled, but setup task was not loaded properly." that we added in this PR.

This is what happened:

  • Rails app
  • Customer was not running their Ruby app with bundle exec
  • When the profiler loaded in ddtracerb exec, the path to load google-protobuf was not setup correctly, so the profiler was not required because Datadog::Profiling.supported? returned false.
  • Then, Rails initialized bundler correctly during its initialization
  • Later, the customer called Datadog.configure { ... } which re-triggered starting the profiler, and now Datadog::Profiling.supported? returned true, but the profiler had not properly being required so this issue was triggered.

I'll create an issue to improve the user experience around this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants