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

Potential unexpected nulls #3

Open
colinscape opened this issue Nov 25, 2019 · 2 comments
Open

Potential unexpected nulls #3

colinscape opened this issue Nov 25, 2019 · 2 comments
Assignees

Comments

@colinscape
Copy link

In the line

        $ddTraceSpan = \DDTrace\GlobalTracer::get()->getActiveSpan();

I suspect it's possible for this to come back with a null, either in the call to get() or the call to getActiveSpan(), if something hasn't worked quite as expected.

I think we should be more explicit about checking these return values before we use them, else we risk some fatal errors and processes shutting down, just because of the logging - which we want to be as invisible as possible.

@erickhun
Copy link
Collaborator

@colinscape if we had your suggested check, https://github.com/bufferapp/buffer-analytics/pull/524 wouldn't have been necessary :D I'll do a PR with your suggested changes soon

Also related to #10

@colinscape
Copy link
Author

@erickhun - ah! 😅 Makes sense! 👍

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

No branches or pull requests

2 participants