Skip to content

Potential unexpected nulls #3

Closed as not planned
Closed as not planned

Description

@colinscape

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.

Activity

  1. erickhun commented on Dec 12, 2019

    @erickhun
    Contributor

    @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

  2. colinscape commented on Dec 12, 2019

    @colinscape
    Author

    @erickhun - ah! 😅 Makes sense! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions