status-go/metrics/whisper/tracer_log.go
Adam Babik 89d89681a3
Add support for metrics (#558)
It adds support for metrics (expvar and Prometheus) along with docker-compose files to run a Whisper test cluster.
2018-01-30 12:51:48 +01:00

18 lines
478 B
Go

// +build !metrics
// Package whisper collects Whisper envelope metrics.
package whisper
import (
whisper "github.com/ethereum/go-ethereum/whisper/whisperv5"
"github.com/status-im/status-go/geth/log"
)
// EnvelopeTracer traces incoming envelopes.
type EnvelopeTracer struct{}
// Trace is called for every incoming envelope.
func (t *EnvelopeTracer) Trace(envelope *whisper.EnvelopeMeta) {
log.Debug("Received Whisper envelope", "hash", envelope.Hash, "data", envelope)
}