Skip to content
This repository has been archived by the owner on Jul 5, 2020. It is now read-only.

Add more context into ActivityIsNull logging #800

Merged
merged 2 commits into from
Jan 30, 2018

Conversation

lmolkova
Copy link
Member

Fix issue #799

A couple of cases where AI (Internal): Current Activity is null may be valid and do not indicate any issue. It is also useless and confusing:

  1. HTTP call to AI backed fires exception (times out or experience any network issues), the Exception event is ignored, but before that, Activity is checked for null and AI (Internal): Current Activity is null is written.

  2. Custom activity for generic diagnostic listener is not enabled and some DS event happens - Activity will be null

So this change moves check for null Activity after check for an event being enabled thus removing unnecessary logging.

In case an event is enabled, we definitely must have Activity.Current, so this message from now on indicates that there is actually a problem, so I've added a bit more context to the log - DS event name.

  • I ran all unit tests locally
  • CHANGELOG.md updated or do not need to be updated
    • If not tell why:
      Change affects internal logging only, nothing changes for the customer

@lmolkova lmolkova merged commit 381eff7 into develop Jan 30, 2018
@lmolkova lmolkova deleted the lmolkova/ActivityNullLogging branch January 30, 2018 20:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants