Skip to content

Convert getAddress logging to histogram #1498

@pragmaxim

Description

@pragmaxim

Problem

Info-level logging is on hot paths. Every GetAddress logs at info level: api/worker.go (line 1703), and broadcast paths log per event: server/websocket.go (line 1506), server/websocket.go (line 1723). Under bursts this becomes real CPU and I/O overhead.

Solution

Convert GetAddress timing to a histogram, not a log line. api/worker.go:1703 is genuinely useful as latency telemetry — but a Prometheus histogram (labels: option, maybe coin) gives you p50/p99 across all calls for free, while the log line gives you one line per call that nobody reads in aggregate. Then either delete the log or guard it with glog.V(2).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions