Skip to content

log: indicate which sink is the cause of an error when a logging error is reporte #72461

@knz

Description

@knz

This is follow up work to #70330.

Currently in log/flags.go we see the following:

  errCallbackλ(err error) {
    // TODO(knz): explain which sink is encountering the error in the
    // error message.
    Ops.Errorf(context.Background(), "logging error: %v", err)
  }
  if s.criticality {
    // TODO(knz): explain which sink is encountering the error in the
    // error message.
    errCallback = λ(err error) {
      Ops.Errorf(context.Background(), "logging error: %v", err)

     ...

The logging error message does not include detail about which sink is causing the error, which makes troubleshooting difficult.

We want to annotate some information about the sink in the error report.

Jira issue: CRDB-11169

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-error-handlingError messages, error propagations/annotationsA-loggingIn and around the logging infrastructure.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions