Skip to content

Spike - Logging consolidation - Do our trace decorators bring any value? #9724

Closed

Description

From the #9611 spike for #8527

See if the decorators have value wherever they are used or if we can replace them with the exported trace functions, and revisit/dev design the useful ones (did I just create a spike from a spike).

Activity

  1. changed the title [-]Logging consolidation - Check the value of our trace decorators[/-] [+]Logging consolidation - Do our trace decorators bring any value?[/+] on Jan 22, 2020
  2. changed the title [-]Logging consolidation - Do our trace decorators bring any value?[/-] [+]Spike - Logging consolidation - Do our trace decorators bring any value?[/+] on Jan 27, 2020
  3. karrtikr commented on Jan 29, 2020

    @karrtikr

    The only decorator which seems to be useful is @traceDecorators.error. To use traceError you've to explicitly put the try..catch block around it, whereas having a decorator makes it much easier to maintain.

    @traceDecorators.verbose() is the major culprit in spamming the Developer console as it also prints the return value object, arguments, and time taken to execute the method.
    The time taken to execute the method can be of little use. For eg. to figure out if fetching conda interpreters takes most of the time. But we use CPU profiles to figure those out.

    So IMO we should be getting rid of all instances of @traceDecorators.verbose/info/warn().

    For the traces provided by @traceDecorators.verbose that could be useful, IMO we should keep using the decorators.

    We can decide which traces are useful when reviewing the PR, which will include the DS team.

  4. DonJayamanne commented on Jan 29, 2020

    @DonJayamanne

    we should be getting rid of @traceDecorators.verbose/info/warn()

    I don't think we should remove all. We (DS team) use a lot of these trace messages when diagnosing bugs & perf related issues.
    We check what interpreters have been found, discovered, whether ds server has started, etc.

    Rich Chiodo (@rchiodo) /cc

  5. DonJayamanne commented on Jan 29, 2020

    @DonJayamanne

    For eg. to figure out if fetching conda interpreters takes most of the time during activation

    Not sure this is true. Extension loads even if conda interpreters takes a long time to load.
    Karthik Nadig (@karthiknadig) I think we had a chat about this. Finding interpreters is a background task, E.g. extension loads in < 180ms for me, finding conda envs takes ~ 1 second for me on a Mac.

  6. karrtikr commented on Jan 29, 2020

    @karrtikr

    That maybe true but that's not the point I was making.

    As far as from the core extension side, these perf traces have not really been helpful, we use CPU profiles to analyse perf issues in bug reports. I agree that maybe we should not remove traces which are common between the extension and DS and which can help you guys.

  7. karthiknadig commented on Jan 29, 2020

    @karthiknadig
    Member

    Don Jayamanne (@DonJayamanne) This spike is only looking at if we need tracing decorators. I agree, we had a chat about interpreter info being a background task and does not directly affect load time. This is only about the decorator them selves and if whatever tracing is captured there is useful.

  8. DonJayamanne commented on Jan 30, 2020

    @DonJayamanne

    selves and if whatever tracing is captured there is useful.

    The logging about what interpreter information has been found and list of interpeters (big blog of json) is not useful.
    It was useful when the code was initially written. I don't think anyone has looked at that except myself when it was originally written.
    Removing that alone will clean up the output significantly

  9. karrtikr commented on Jan 30, 2020

    @karrtikr

    We check what interpreters have been found, discovered

    Don Jayamanne (@DonJayamanne) Which verbose do you use to track these then? If you don't need the actually interpreter info.

    As I noted in my original comment #9724 (comment), we can decide which verbose are important while reviewing the PRs.

  10. karrtikr commented on Jan 30, 2020

    @karrtikr

    Closed in favor of #9837

  11. ghost removed
    needs proposalNeed to make some design decisions
    on Jan 30, 2020
  12. locked as resolved and limited conversation to collaborators on Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-diagnosticsLogging/Features to facilitate diagnosing user problemsdebtCode quality issues

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions