{"modulePath":"github.com/onflow/flow-archive","version":"v0.31.9-decrease-wait-interval","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package metrics\n\n## Functions\n\n```go\nfunc RegisterBadgerMetrics() error\n```\n\n## Types\n\n```go\ntype MetricsWriter struct {\n\t// contains filtered or unexported fields\n}\n```\nMetricsWriter wraps the writer and records metrics for the data it writes.\n\n```go\nfunc NewMetricsWriter(write *index.Writer) *MetricsWriter\n```\nNewMetricsWriter creates a counter that counts indexed elements and exposes this information as prometheus counters.\n\n```go\nfunc (w *MetricsWriter) Collections(height uint64, collections []*flow.LightCollection) error\n```\n\n```go\nfunc (w *MetricsWriter) Commit(height uint64, commit flow.StateCommitment) error\n```\n\n```go\nfunc (w *MetricsWriter) Events(height uint64, events []flow.Event) error\n```\n\n```go\nfunc (w *MetricsWriter) First(height uint64) error\n```\n\n```go\nfunc (w *MetricsWriter) Guarantees(height uint64, guarantees []*flow.CollectionGuarantee) error\n```\n\n```go\nfunc (w *MetricsWriter) Header(height uint64, header *flow.Header) error\n```\n\n```go\nfunc (w *MetricsWriter) Height(blockID flow.Identifier, height uint64) error\n```\n\n```go\nfunc (w *MetricsWriter) Last(height uint64) error\n```\n\n```go\nfunc (w *MetricsWriter) Payloads(height uint64, payloads []*ledger.Payload) error\n```\n\n```go\nfunc (w *MetricsWriter) Registers(height uint64, registers []*wal.LeafNode) error\n```\n\n```go\nfunc (w *MetricsWriter) Results(results []*flow.TransactionResult) error\n```\n\n```go\nfunc (w *MetricsWriter) Seals(height uint64, seals []*flow.Seal) error\n```\n\n```go\nfunc (w *MetricsWriter) Transactions(height uint64, transactions []*flow.TransactionBody) error\n```\n\n```go\ntype Server struct {\n\t// contains filtered or unexported fields\n}\n```\nServer is the http server that will be serving the /metrics request for prometheus.\n\n```go\nfunc NewServer(log zerolog.Logger, address string) *Server\n```\nNewServer creates a new server that exposes metrics.\n\n```go\nfunc (s *Server) Start() error\n```\nStart registers the metrics and launches the server.\n\n```go\ntype Tracer struct {\n\t// contains filtered or unexported fields\n}\n```\nTracer is a generic tracer implementation for the Archive API servers\n\n```go\nfunc NewTracer(log zerolog.Logger, serviceName string) (*Tracer, error)\n```\n\n```go\nfunc (t *Tracer) Done() \u003c-chan struct{}\n```\nDone returns a channel that will close when shutdown is complete.\n\n```go\nfunc (t *Tracer) Ready() \u003c-chan struct{}\n```\nReady returns a channel that will close when the network stack is ready.\n\n```go\nfunc (t *Tracer) StartSpanFromContext(\n\tctx context.Context,\n\toperationName archiveTrace.SpanName,\n\topts ...trace.SpanStartOption,\n) (context.Context, trace.Span)\n```\n\n","path":"github.com/onflow/flow-archive/service/metrics","name":"metrics","synopsis":"","isRedistributable":true}
