Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

trace: several tracing improvements #9153

Merged
merged 9 commits into from
Mar 20, 2020
Merged

Commits on Mar 20, 2020

  1. trace: replace LazyLog with LogFields

    LazyLog wouldn't log to opentracing. So we remove it and add a LazyLogger for
    fmt.Stringers such that we can update call sites of LazyLog.
    keegancsmith committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    bd7b0e6 View commit details
    Browse the repository at this point in the history
  2. trace: LazyPrintf logs to opentracing

    LazyPrintf is used quite extensively in our codebase. I wanted to update all
    to LogFields, but it is too many callsites. Instead I have made LazyPrintf
    call LogFields, but still preserve the lazy behaviour. Follow-up commits will
    clean up call sites of LazyPrintf.
    keegancsmith committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    69872a8 View commit details
    Browse the repository at this point in the history
  3. search: use LogFields for searchSymbols

    One callsite updated to use LogFields instead. I wanted to update lots, but
    stopped when I realised how much effort that would be. Going forward the
    updates will be much more targetted.
    keegancsmith committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    7e364a4 View commit details
    Browse the repository at this point in the history
  4. trace: add SQL for better lazy logging

    This adds a new opentracing Field which emits much nicer SQL logs.
    keegancsmith committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    a8ea5cc View commit details
    Browse the repository at this point in the history
  5. doc: mention jaeger URL when port forwarding

    I found this quite convenient to just click on, instead of assuming the admin
    knows to check localhost.
    keegancsmith committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    755ce07 View commit details
    Browse the repository at this point in the history
  6. db: use internal/trace for sql tracing

    Only logged to opentracing currently. This will allow us to also log to
    net/trace.
    keegancsmith committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    801858f View commit details
    Browse the repository at this point in the history
  7. fix lint warning

    go lint now knows to check the printf args which is cool, so it picked up this misuse.
    keegancsmith committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    a4dc4bb View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5068e89 View commit details
    Browse the repository at this point in the history
  9. trace: correctly marshal lazy otlog.Fields

    otlog.Field.String() just marshals the function for Lazy fields, instead of
    actually calling the function to emit its values. This lead to the net/trace
    logs to just log the function pointer numbers, instead of the values you want.
    keegancsmith committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    26069d5 View commit details
    Browse the repository at this point in the history