Skip to content

Review per-request debug logging in internal/ct/handlers.go #843

@patflynn

Description

@patflynn

Spun out of review feedback on #841 (klog → slog migration).

The per-request slog.Debug calls in internal/ct/handlers.go (e.g. the request-received line at the top of appHandler.ServeHTTP, the => storage.Add and <= SCT markers in addChainInternal, etc.) will be extremely chatty for a public-facing log if debug is ever enabled.

The migration preserved them as direct equivalents of the old klog.V(N).Infof calls, but it's worth asking whether they're still the right tool:

  • A lot of this is essentially "what happened during this request?" data, which OpenTelemetry spans/events would represent more cleanly (already wired up via tracer.Start).
  • Some calls may simply be obsolete and safe to delete.

Action: audit the per-request debug logs and either drop them, fold them into the existing OTel span as events/attributes, or keep them with a justification.

Related: #842 (the same reasoning applies to requestlog.go).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions