Documentation
¶
Index ¶
- Constants
- type AccountRegisteredEventDetails
- type AccountsUpdateMetrics
- type AssembleBlockMetrics
- type AssembleBlockStats
- type BalancesAccountVacuumEventDetails
- type BlockAcceptedEventDetails
- type BlockProposedEventDetails
- type BlockStatsEventDetails
- type CatchpointGenerationEventDetails
- type CatchpointRootUpdateEventDetails
- type CatchupStartEventDetails
- type CatchupStopEventDetails
- type Category
- type ConnectPeerFailEventDetails
- type DeadManTriggeredEventDetails
- type DisconnectPeerEventDetails
- type EquivocatedVoteEventDetails
- type ErrorOutputEventDetails
- type Event
- type HTTPRequestDetails
- type HeartbeatEventDetails
- type LocalMsgTiming
- type Metric
- type MetricDetails
- type NameValue
- type NewRoundPeriodDetails
- type PartKeyRegisteredEventDetails
- type PeerConnectionDetails
- type PeerEventDetails
- type PeersConnectionDetails
- type ProcessBlockMetrics
- type RoundTimingMetrics
- type StartupEventDetails
- type StateProofStats
- type TimeWithSender
- type VoteEventDetails
- type VoteRejectedEventDetails
Constants ¶
const AssembleBlockAbandon = "block-abandon"
AssembleBlockAbandon represents the block generation being abandoned since it won't be needed.
const AssembleBlockEmpty = "pool-empty"
AssembleBlockEmpty represents AssembleBlock exiting due to no more txns
const AssembleBlockEvalOld = "eval-old"
AssembleBlockEvalOld represents the assembled block that was returned being a round too old
const AssembleBlockFull = "block-full"
AssembleBlockFull represents AssembleBlock exiting due to block being full
const AssembleBlockPoolBehind = "pool-behind"
AssembleBlockPoolBehind represents the transaction pool being more than two roudns behind
const AssembleBlockTimeout = "timeout"
AssembleBlockTimeout represents AssembleBlock exiting due to timeout
const AssembleBlockTimeoutEmpty = "timeout-empty"
AssembleBlockTimeoutEmpty represents AssembleBlock giving up after a timeout and returning an empty block
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountRegisteredEventDetails ¶
type AccountRegisteredEventDetails struct {
Address string
}
AccountRegisteredEventDetails contains details for the AccountRegisteredEvent
type AccountsUpdateMetrics ¶
type AccountsUpdateMetrics struct {
StartRound uint64
RoundsCount uint64
OldAccountPreloadDuration time.Duration
MerkleTrieUpdateDuration time.Duration
AccountsWritingDuration time.Duration
DatabaseCommitDuration time.Duration
MemoryUpdatesDuration time.Duration
UpdatedAccountsCount uint64
UpdatedResourcesCount uint64
UpdatedCreatablesCount uint64
}
AccountsUpdateMetrics is the set of metrics captured when we process accountUpdates.commitRound
func (AccountsUpdateMetrics) Identifier ¶
func (m AccountsUpdateMetrics) Identifier() Metric
Identifier implements the required MetricDetails interface, retrieving the Identifier for this set of metrics.
type AssembleBlockMetrics ¶
type AssembleBlockMetrics struct {
AssembleBlockStats
}
AssembleBlockMetrics is the set of metrics captured when we compute AssembleBlock
func (AssembleBlockMetrics) Identifier ¶
func (m AssembleBlockMetrics) Identifier() Metric
Identifier implements the required MetricDetails interface, retrieving the Identifier for this set of metrics.
type AssembleBlockStats ¶
type AssembleBlockStats struct {
StartCount int
IncludedCount int // number of transactions that are included in a block
InvalidCount int // number of transaction groups that are included in a block
MinFeeErrorCount int // number of transactions excluded because the fee is too low
LogicErrorCount int // number of transactions excluded due to logic error (contract no longer valid)
ExpiredCount int // number of transactions removed because of expiration
ExpiredLongLivedCount int // number of expired transactions with non-super short LastValid values
LeaseErrorCount int // number of transactions removed because it has an already used lease
MinFee uint64
MaxFee uint64
AverageFee uint64
MinLength int
MaxLength int
MinPriority uint64
MaxPriority uint64
CommittedCount int // number of transaction blocks that are included in a block
StopReason string
TotalLength uint64
EarlyCommittedCount uint64 // number of transaction groups that were pending on the transaction pool but have been included in previous block
Nanoseconds int64
ProcessingTime transactionProcessingTimeDistribution
BlockGenerationDuration uint64
TransactionsLoopStartTime int64
StateProofNextRound uint64 // next round for which state proof if expected
StateProofStats StateProofStats
}
AssembleBlockStats is the set of stats captured when we compute AssemblePayset
func (AssembleBlockStats) String ¶
func (m AssembleBlockStats) String() string
type BalancesAccountVacuumEventDetails ¶
type BalancesAccountVacuumEventDetails struct {
// VacuumTimeNanoseconds is the total amount of time, in nanoseconds, that the vacuum operation took
VacuumTimeNanoseconds int64
// BeforeVacuumPageCount is the number of pages that the balances database had prior of running the vacuuming process.
BeforeVacuumPageCount uint64
// AfterVacuumPageCount is the number of pages that the balances database had after running the vacuuming process.
AfterVacuumPageCount uint64
// BeforeVacuumSpaceBytes is the number of bytes used by the database prior of running the vacuuming process.
BeforeVacuumSpaceBytes uint64
// AfterVacuumSpaceBytes is the number of bytes used by the database after running the vacuuming process.
AfterVacuumSpaceBytes uint64
}
BalancesAccountVacuumEventDetails is generated once the balances account get vacuumed, and provides some statistics about that event.
type BlockAcceptedEventDetails ¶
type BlockAcceptedEventDetails struct {
Address string
Hash string
Round uint64
ValidatedAt time.Duration
ReceivedAt time.Duration
VoteValidatedAt time.Duration
DynamicFilterTimeout time.Duration
PreValidated bool
PropBufLen uint64
VoteBufLen uint64
}
BlockAcceptedEventDetails contains details for the BlockAcceptedEvent
type BlockProposedEventDetails ¶
type BlockProposedEventDetails struct {
Address string
Hash string
Round uint64
Period uint64
Step uint64
}
BlockProposedEventDetails contains details for the BlockProposedEvent
type BlockStatsEventDetails ¶
type BlockStatsEventDetails struct {
Hash string
OriginalProposer string
Round uint64
Transactions uint64
ActiveUsers uint64
AgreementDurationMs uint64
NetworkDowntimeMs uint64
}
BlockStatsEventDetails contains details for BlockStatsEvent
type CatchpointGenerationEventDetails ¶
type CatchpointGenerationEventDetails struct {
// AccountsRound the round in which the account snapshot is taken
AccountsRound uint64
// WritingDuration is the total elapsed time it took to write the catchpoint file.
WritingDuration uint64
// CPUTime is the single-core time spent waiting to the catchpoint file to be written.
// this time excludes all the sleeping time taken, and represent the actual time it would
// take if we were doing the writing on a dedicated process
CPUTime uint64
// BalancesWriteDuration is the time duration it took to write the balances portion
// ( i.e. update the account balances + update the trie )
BalancesWriteTime uint64
// AccountsCount is the number of accounts that were written into the generated catchpoint file
AccountsCount uint64
// KVsCount, OnlineAccountsCount, OnlineRoundParamsCount are sizes written into the generated catchpoint file
KVsCount, OnlineAccountsCount, OnlineRoundParamsCount uint64
// FileSize is the size of the catchpoint file, in bytes.
FileSize uint64
// MerkleTrieRootHash is the merkle trie root hash represents all accounts and kvs
MerkleTrieRootHash string
// SPVerificationCtxsHash is the hash of all the state proof verification contexts in the catchpoint
SPVerificationCtxsHash string
}
CatchpointGenerationEventDetails is generated once a catchpoint file is being created, and provide some statistics about that event.
type CatchpointRootUpdateEventDetails ¶
type CatchpointRootUpdateEventDetails struct {
Root string
OldBase uint64
NewBase uint64
NewPageCount int `json:"npc"`
NewNodeCount int `json:"nnc"`
UpdatedPageCount int `json:"upc"`
UpdatedNodeCount int `json:"unc"`
DeletedPageCount int `json:"dpc"`
FanoutReallocatedNodeCount int `json:"frnc"`
PackingReallocatedNodeCount int `json:"prnc"`
LoadedPages int `json:"lp"`
}
CatchpointRootUpdateEventDetails is generated when the catchpoint merkle trie root is updated, when account updates for rounds are flushed to disk.
type CatchupStartEventDetails ¶
type CatchupStartEventDetails struct {
StartRound uint64
}
CatchupStartEventDetails contains details for the CatchupStartEvent
type CatchupStopEventDetails ¶
type CatchupStopEventDetails struct {
StartRound uint64
EndRound uint64
Time time.Duration
InitSync bool
}
CatchupStopEventDetails contains details for the CatchupStopEvent
type Category ¶
type Category string
Category is the type used to identify strings used for telemetry categories. We want these to be stable and easy to find / document so we can create queries against them.
const Accounts Category = "Accounts"
Accounts category
const Agreement Category = "Agreement"
Agreement category
const ApplicationState Category = "ApplicationState"
ApplicationState category
const HostApplicationState Category = "HostApplicationState"
HostApplicationState category
const Network Category = "Network"
Network category
const Transaction Category = "Transaction"
Transaction category
type ConnectPeerFailEventDetails ¶
type ConnectPeerFailEventDetails struct {
Address string
TelemetryGUID string `json:"HostName"`
Incoming bool
InstanceName string
Reason string
}
ConnectPeerFailEventDetails contains details for the ConnectPeerFailEvent
type DeadManTriggeredEventDetails ¶
DeadManTriggeredEventDetails contains details for DeadManTriggeredEvent
type DisconnectPeerEventDetails ¶
type DisconnectPeerEventDetails struct {
PeerEventDetails
Reason string
// Received message counters for this peer while it was connected
TXCount, MICount, AVCount, PPCount uint64
}
DisconnectPeerEventDetails contains details for the DisconnectPeerEvent
type EquivocatedVoteEventDetails ¶
type EquivocatedVoteEventDetails struct {
VoterAddress string
ProposalHash string
Round uint64
Period uint64
Step uint64
Weight uint64
PreviousProposalHash1 string
PreviousProposalHash2 string
}
EquivocatedVoteEventDetails contains details for the EquivocatedVoteEvent
type ErrorOutputEventDetails ¶
ErrorOutputEventDetails contains details for ErrorOutputEvent
type Event ¶
type Event string
Event is the type used to identify telemetry events We want these to be stable and easy to find / document so we can create queries against them.
const AccountRegisteredEvent Event = "AccountRegistered"
AccountRegisteredEvent event
const BalancesAccountVacuumEvent Event = "VacuumBalances"
BalancesAccountVacuumEvent event
const BlockAcceptedEvent Event = "BlockAccepted"
BlockAcceptedEvent event
const BlockProposedEvent Event = "BlockProposed"
BlockProposedEvent event
const BlockStatsEvent Event = "BlockStats"
BlockStatsEvent event
const CatchpointGenerationEvent Event = "CatchpointGeneration"
CatchpointGenerationEvent event
const CatchpointRootUpdateEvent Event = "CatchpointRoot"
CatchpointRootUpdateEvent event
const CatchupStartEvent Event = "CatchupStart"
CatchupStartEvent event
const CatchupStopEvent Event = "CatchupStop"
CatchupStopEvent event
const ConnectPeerEvent Event = "ConnectPeer"
ConnectPeerEvent event
const ConnectPeerFailEvent Event = "ConnectPeerFail"
ConnectPeerFailEvent event
const DeadManTriggeredEvent Event = "DeadManTriggered"
DeadManTriggeredEvent event
const DisconnectPeerEvent Event = "DisconnectPeer"
DisconnectPeerEvent event
const EquivocatedVoteEvent Event = "EquivocatedVoteEvent"
EquivocatedVoteEvent event
const ErrorOutputEvent Event = "ErrorOutput"
ErrorOutputEvent event
const HTTPRequestEvent Event = "HTTPRequest"
HTTPRequestEvent event
const HeartbeatEvent Event = "Heartbeat"
HeartbeatEvent is sent periodically to indicate node is running
const NewPeriodEvent Event = "NewPeriod"
NewPeriodEvent event
const PartKeyRegisteredEvent Event = "PartKeyRegistered"
PartKeyRegisteredEvent event
const PeerConnectionsEvent Event = "PeerConnections"
PeerConnectionsEvent event
const ShutdownEvent Event = "Shutdown"
ShutdownEvent event
const StartupEvent Event = "Startup"
StartupEvent event
const VoteAcceptedEvent Event = "VoteAccepted"
VoteAcceptedEvent event
const VoteRejectedEvent Event = "VoteRejected"
VoteRejectedEvent event
const VoteSentEvent Event = "VoteSent"
VoteSentEvent event
type HTTPRequestDetails ¶
type HTTPRequestDetails struct {
Client string // The ip address of the remote
InstanceName string // The node identifier
Request string // The request string, i.e. "GET /apache_pb.gif HTTP/1.0"
StatusCode uint64 // The response status code
BodyLength uint64 // The returned body length, in bytes
UserAgent string // The user-agent string ( if any )
}
HTTPRequestDetails contains details for the HTTPRequestEvent This should resemble the Common Log Format, as it's being used as the source data for generating it.
type HeartbeatEventDetails ¶
type HeartbeatEventDetails struct {
Info struct {
Version string `json:"version"`
VersionNum string `json:"version-num"`
Channel string `json:"channel"`
Branch string `json:"branch"`
CommitHash string `json:"commit-hash"`
} `json:"Metrics"` // backwards compatible name
Metrics map[string]float64 `json:"m"`
}
HeartbeatEventDetails contains details for the StartupEvent
type LocalMsgTiming ¶
type LocalMsgTiming struct {
// LRFirst is the time a message type is first received. For this to
// be useful we should test deployments with non-voting nodes.
LRFirst *TimeWithSender `json:"lrfirst,omitempty"`
// LRLast is the time a message type is last received (and not filtered).
LRLast *TimeWithSender `json:"lrlast,omitempty"`
// LStart is the step start time. We could derive from elsewhere.
LStart *time.Duration `json:"lstart,omitempty"` // optional
// LRWin is the time a "winning" message is received, defined for proposals/payloads.
LRWin *TimeWithSender `json:"lrwin,omitempty"` // optional
// LRThresh is the time a threshold is triggered locally.
LRThresh *time.Duration `json:"lrtresh,omitempty"` // optional
}
LocalMsgTiming contains timing for a single message type. The time is in int64 ns precision offsets (from some relevant time defined by context; normally, round start time).
type Metric ¶
type Metric string
Metric is the type used to identify metrics We want these to be stable and easy to find / document so we can create queries against them.
type MetricDetails ¶
type MetricDetails interface {
Identifier() Metric
}
MetricDetails is an interface to be implemented by structs containing metrics for a specific identifier. The identifier is queried directly from the MetricDetails to simplify things.
type NameValue ¶
type NameValue struct {
Name string
Value interface{}
}
NameValue defines a named value, for use in an array reported to telemetry.
type NewRoundPeriodDetails ¶
type NewRoundPeriodDetails struct {
OldRound uint64
OldPeriod uint64
OldStep uint64
NewRound uint64
NewPeriod uint64
NewStep uint64
LocalTime time.Time
}
NewRoundPeriodDetails contains details for every new round or new period We explicitly log local time even though a timestamp is generated by logger.
type PartKeyRegisteredEventDetails ¶
PartKeyRegisteredEventDetails contains details for the PartKeyRegisteredEvent
type PeerConnectionDetails ¶
type PeerConnectionDetails struct {
// Address is the IP address of the remote connected socket
Address string
// The TelemetryGUID is the TelemetryGUID passed via the X-Algorand-TelId header during the http connection handshake.
TelemetryGUID string `json:"HostName"`
// InstanceName is the node-specific hashed instance name that was passed via X-Algorand-InstanceName header during the http connection handshake.
InstanceName string
// ConnectionDuration is the duration of the connection, in seconds.
ConnectionDuration uint
// Endpoint is the dialed-to address, for an outgoing connection. Not being used for incoming connection.
Endpoint string `json:",omitempty"`
// MessageDelay is the average relative message delay. Not being used for incoming connection.
MessageDelay int64 `json:",omitempty"`
// DuplicateFilterCount is the number of times this peer has sent us a message hash to filter that it had already sent before.
DuplicateFilterCount uint64
// These message counters count received messages from this peer.
TXCount, MICount, AVCount, PPCount, UNKCount uint64
// TCPInfo provides connection measurements from TCP.
TCP util.TCPInfo `json:",omitempty"`
}
PeerConnectionDetails contains details for PeerConnectionsEvent regarding a single peer ( either incoming or outgoing )
type PeerEventDetails ¶
type PeerEventDetails struct {
Address string
TelemetryGUID string `json:"HostName"`
Incoming bool
InstanceName string
// Endpoint is the dialed-to address, for an outgoing connection. Not being used for incoming connection.
Endpoint string `json:",omitempty"`
// MessageDelay is the average relative message delay. Not being used for incoming connection.
MessageDelay int64 `json:",omitempty"`
}
PeerEventDetails contains details for the ConnectPeerEvent
type PeersConnectionDetails ¶
type PeersConnectionDetails struct {
IncomingPeers []PeerConnectionDetails
OutgoingPeers []PeerConnectionDetails
}
PeersConnectionDetails contains details for PeerConnectionsEvent
type ProcessBlockMetrics ¶
type ProcessBlockMetrics struct {
KnownCommittedCount uint
UnknownCommittedCount uint
ExpiredCount uint
RemovedInvalidCount uint
}
ProcessBlockMetrics is the set of metrics captured when we process OnNewBlock
func (ProcessBlockMetrics) Identifier ¶
func (m ProcessBlockMetrics) Identifier() Metric
Identifier implements the required MetricDetails interface, retrieving the Identifier for this set of metrics.
type RoundTimingMetrics ¶
type RoundTimingMetrics struct {
// We keep track of timingInfo for period 0 step <= 3 only, for brevity
Round uint64 `json:"round"`
ConcludingStep uint64 `json:"laststep"`
// Local Timings. Eventually, we could
// attach timing information at the network layer to messages - but that is a
// larger change I'd rather avoid for now. However, this means right now we
// can only recover transit time information through telemetry, so we'll save
// logging more thorough delivery distributions for a second pass. (-ben)
LRoundStart time.Time `json:"lroundstart"`
// LVotes contains times this player (would have) sent corresponding votes,
// and times this player receives votes.
LVotes map[uint64]LocalMsgTiming `json:"lvotes"`
// LPayload contains times this player received payloads relevant to this round.
LPayload LocalMsgTiming `json:"lpayload"`
// BlockAssemble time specifies the duration from start of Round to Block Assembly completion
BlockAssemble time.Duration `json:"lblockassemble"`
// Payload Validation time contains the event times for Payload validation, once for each account
PayloadValidation LocalMsgTiming `json:"lpayloadvalidation"`
}
RoundTimingMetrics contain timing details for common message types. All times (except round start time) are offset times, in int64 ns precision relative to RoundTimingMetrics.LRoundStart.
func (RoundTimingMetrics) Identifier ¶
func (m RoundTimingMetrics) Identifier() Metric
Identifier implements the required MetricDetails interface, retrieving the Identifier for this set of metrics.
type StartupEventDetails ¶
type StartupEventDetails struct {
Version string
CommitHash string
Branch string
Channel string
InstanceHash string
Overrides []NameValue
}
StartupEventDetails contains details for the StartupEvent
type StateProofStats ¶
type StateProofStats struct {
ProvenWeight uint64
SignedWeight uint64
NumReveals int
NumPosToReveal int
TxnSize int
}
StateProofStats is the set of stats captured when a StateProof is present in the assembled block
type TimeWithSender ¶
TimeWithSender contains a timestamp and message source.
type VoteEventDetails ¶
type VoteEventDetails struct {
Address string
Hash string
Round uint64
Period uint64
Step uint64
Weight uint64
Recovered bool
}
VoteEventDetails contains details for the VoteSentEvent
type VoteRejectedEventDetails ¶
type VoteRejectedEventDetails struct {
VoteEventDetails
Reason string
}
VoteRejectedEventDetails contains details for the VoteSentEvent