Documentation ¶
Index ¶
- Constants
- type AccountRegisteredEventDetails
- type AssembleBlockMetrics
- type AssembleBlockStats
- type BlockAcceptedEventDetails
- type BlockProposedEventDetails
- type BlockStatsEventDetails
- 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 NewRoundPeriodDetails
- type Operation
- type PartKeyRegisteredEventDetails
- type PeerEventDetails
- type ProcessBlockMetrics
- type RoundTimingMetrics
- type StartupEventDetails
- type TimeWithSender
- type TopAccountEventDetails
- type VoteEventDetails
- type VoteRejectedEventDetails
Constants ¶
const AssembleBlockEmpty = "pool-empty"
AssembleBlockEmpty represents AssemblePayset exiting due to no more txns
const AssembleBlockFull = "block-full"
AssembleBlockFull represents AssemblePayset exiting due to block being full
const AssembleBlockTimeout = "timeout"
AssembleBlockTimeout represents AssemblePayset exiting due to timeout
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 AssembleBlockMetrics ¶
type AssembleBlockMetrics struct {
AssembleBlockStats
}
AssembleBlockMetrics is the set of metrics captured when we compute AssemblePayset
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 InvalidCount int MinFee uint64 MaxFee uint64 AverageFee uint64 MinLength int MaxLength int MinPriority uint64 MaxPriority uint64 CommittedCount int StopReason string TotalLength uint64 EarlyCommittedCount uint64 Nanoseconds int64 }
AssembleBlockStats is the set of stats captured when we compute AssemblePayset
type BlockAcceptedEventDetails ¶
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 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 HostName string 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 }
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 BlockAcceptedEvent Event = "BlockAccepted"
BlockAcceptedEvent event
const BlockProposedEvent Event = "BlockProposed"
BlockProposedEvent event
const BlockStatsEvent Event = "BlockStats"
BlockStatsEvent 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 ShutdownEvent Event = "Shutdown"
ShutdownEvent event
const StartupEvent Event = "Startup"
StartupEvent event
const TopAccountsEvent Event = "TopAccounts"
TopAccountsEvent 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 ¶
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 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 Operation ¶
type Operation string
Operation is the type used to identify strings used for telemetry operation identifiers. We want these to be stable and easy to find / document so we can create queries against them.
type PartKeyRegisteredEventDetails ¶
PartKeyRegisteredEventDetails contains details for the PartKeyRegisteredEvent
type PeerEventDetails ¶
PeerEventDetails contains details for the ConnectPeerEvent
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 }
StartupEventDetails contains details for the StartupEvent
type TimeWithSender ¶
TimeWithSender contains a timestamp and message source.
type TopAccountEventDetails ¶
type TopAccountEventDetails struct { Round uint64 OnlineAccounts []map[string]interface{} OnlineCirculation uint64 OfflineCirculation uint64 }
TopAccountEventDetails contains details for the BlockAcceptedEvent
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