telemetryspec

package
v0.0.0-...-15eb78e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const AssembleBlockAbandon = "block-abandon"

AssembleBlockAbandon represents the block generation being abandoned since it won't be needed.

View Source
const AssembleBlockEmpty = "pool-empty"

AssembleBlockEmpty represents AssemblePayset exiting due to no more txns

View Source
const AssembleBlockFull = "block-full"

AssembleBlockFull represents AssemblePayset exiting due to block being full

View Source
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 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
	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 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 // number of transactions that are included in a block
	InvalidCount              int // number of transaction groups that are included in a block
	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            transactionProcessingTimeDistibution
	BlockGenerationDuration   uint64
	TransactionsLoopStartTime int64
}

AssembleBlockStats is the set of stats captured when we compute AssemblePayset

AssembleBlockStats는 AssemblePayset을 계산할 때 캡처된 통계 집합입니다 즉, 서명된 트랜잭션 집합을 하나의 블록으로 조립할 때 계산된 통계치를 나타냄.

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
}

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 {
	// 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
	// FileSize is the size of the catchpoint file, in bytes.
	FileSize uint64
	// CatchpointLabel is the catchpoint label for which the catchpoint file was generated.
	CatchpointLabel string
}

CatchpointGenerationEventDetails is generated once a catchpoint file is being created, and provide some statistics about that event.

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

type DeadManTriggeredEventDetails struct {
	Timeout      int64
	CurrentBlock uint64
	GoRoutines   string
}

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

type ErrorOutputEventDetails struct {
	Output string
	Error  string
}

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 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 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

type HeartbeatEventDetails struct {
	Metrics map[string]string
}

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

type PartKeyRegisteredEventDetails struct {
	Address    string
	FirstValid uint64
	LastValid  uint64
}

PartKeyRegisteredEventDetails contains details for the PartKeyRegisteredEvent

type PeerConnectionDetails

type PeerConnectionDetails struct {
	// Address is the IP address of the remote connected socket
	Address string
	// The HostName is the TelemetryGUID passed via the X-Algorand-TelId header during the http connection handshake.
	HostName string
	// 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 avarage relative message delay. Not being used for incoming connection.
	MessageDelay int64 `json:",omitempty"`
}

PeerConnectionDetails contains details for PeerConnectionsEvent regarding a single peer ( either incoming or outgoing )

type PeerEventDetails

type PeerEventDetails struct {
	Address      string
	HostName     string
	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 avarage 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
}

StartupEventDetails contains details for the StartupEvent

type TimeWithSender

type TimeWithSender struct {
	T      time.Duration `json:"t"`
	Sender string        `json:"sender"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL