Documentation ¶
Index ¶
- Constants
- type InternalTracer
- func (t *InternalTracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)
- func (t *InternalTracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error
- func (t *InternalTracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
- type LogSpan
- func (s *LogSpan) BaggageItem(restrictedKey string) string
- func (s *LogSpan) Context() opentracing.SpanContext
- func (s *LogSpan) Finish()
- func (s *LogSpan) FinishWithOptions(opts opentracing.FinishOptions)
- func (s *LogSpan) Log(data opentracing.LogData)
- func (s *LogSpan) LogEvent(event string)
- func (s *LogSpan) LogEventWithPayload(event string, payload interface{})
- func (s *LogSpan) LogFields(fields ...log.Field)
- func (s *LogSpan) LogKV(alternatingKeyValues ...interface{})
- func (s *LogSpan) ProduceLog()
- func (s *LogSpan) SetBaggageItem(restrictedKey, value string) opentracing.Span
- func (s *LogSpan) SetOperationName(operationName string) opentracing.Span
- func (s *LogSpan) SetTag(key string, value interface{}) opentracing.Span
- func (s *LogSpan) Tracer() opentracing.Tracer
- type LogTracer
- func (t *LogTracer) Done() <-chan struct{}
- func (t *LogTracer) Ready() <-chan struct{}
- func (t *LogTracer) RecordSpanFromParent(span opentracing.Span, operationName SpanName, duration time.Duration, ...)
- func (t *LogTracer) StartBlockSpan(ctx context.Context, blockID flow.Identifier, spanName SpanName, ...) (opentracing.Span, context.Context, bool)
- func (t *LogTracer) StartCollectionSpan(ctx context.Context, collectionID flow.Identifier, spanName SpanName, ...) (opentracing.Span, context.Context, bool)
- func (t *LogTracer) StartSpanFromContext(ctx context.Context, operationName SpanName, ...) (opentracing.Span, context.Context)
- func (t *LogTracer) StartSpanFromParent(span opentracing.Span, operationName SpanName, ...) opentracing.Span
- func (t *LogTracer) StartTransactionSpan(ctx context.Context, transactionID flow.Identifier, spanName SpanName, ...) (opentracing.Span, context.Context, bool)
- func (t *LogTracer) WithSpanFromContext(ctx context.Context, operationName SpanName, f func(), ...)
- type NoopSpan
- func (s *NoopSpan) BaggageItem(restrictedKey string) string
- func (s *NoopSpan) Context() opentracing.SpanContext
- func (s *NoopSpan) Finish()
- func (s *NoopSpan) FinishWithOptions(opts opentracing.FinishOptions)
- func (s *NoopSpan) Log(data opentracing.LogData)
- func (s *NoopSpan) LogEvent(event string)
- func (s *NoopSpan) LogEventWithPayload(event string, payload interface{})
- func (s *NoopSpan) LogFields(fields ...log.Field)
- func (s *NoopSpan) LogKV(alternatingKeyValues ...interface{})
- func (s *NoopSpan) SetBaggageItem(restrictedKey, value string) opentracing.Span
- func (s *NoopSpan) SetOperationName(operationName string) opentracing.Span
- func (s *NoopSpan) SetTag(key string, value interface{}) opentracing.Span
- func (s *NoopSpan) Tracer() opentracing.Tracer
- type NoopSpanContext
- type NoopTracer
- func (t *NoopTracer) Done() <-chan struct{}
- func (t *NoopTracer) Ready() <-chan struct{}
- func (t *NoopTracer) RecordSpanFromParent(span opentracing.Span, operationName SpanName, duration time.Duration, ...)
- func (t *NoopTracer) StartBlockSpan(ctx context.Context, entityID flow.Identifier, spanName SpanName, ...) (opentracing.Span, context.Context, bool)
- func (t *NoopTracer) StartCollectionSpan(ctx context.Context, entityID flow.Identifier, spanName SpanName, ...) (opentracing.Span, context.Context, bool)
- func (t *NoopTracer) StartSpanFromContext(ctx context.Context, operationName SpanName, ...) (opentracing.Span, context.Context)
- func (t *NoopTracer) StartSpanFromParent(span opentracing.Span, operationName SpanName, ...) opentracing.Span
- func (t *NoopTracer) StartTransactionSpan(ctx context.Context, entityID flow.Identifier, spanName SpanName, ...) (opentracing.Span, context.Context, bool)
- func (t *NoopTracer) WithSpanFromContext(ctx context.Context, operationName SpanName, f func(), ...)
- type OpenTracer
- func (t *OpenTracer) Done() <-chan struct{}
- func (t *OpenTracer) Ready() <-chan struct{}
- func (t *OpenTracer) RecordSpanFromParent(span opentracing.Span, operationName SpanName, duration time.Duration, ...)
- func (t *OpenTracer) StartBlockSpan(ctx context.Context, blockID flow.Identifier, spanName SpanName, ...) (opentracing.Span, context.Context, bool)
- func (t *OpenTracer) StartCollectionSpan(ctx context.Context, collectionID flow.Identifier, spanName SpanName, ...) (opentracing.Span, context.Context, bool)
- func (t *OpenTracer) StartSpanFromContext(ctx context.Context, operationName SpanName, ...) (opentracing.Span, context.Context)
- func (t *OpenTracer) StartSpanFromParent(span opentracing.Span, operationName SpanName, ...) opentracing.Span
- func (t *OpenTracer) StartTransactionSpan(ctx context.Context, transactionID flow.Identifier, spanName SpanName, ...) (opentracing.Span, context.Context, bool)
- func (t *OpenTracer) WithSpanFromContext(ctx context.Context, operationName SpanName, f func(), ...)
- type SpanName
Constants ¶
const DefaultEntityCacheSize = 1000
const EntityTypeBlock = "Block"
const EntityTypeCollection = "Collection"
const EntityTypeTransaction = "Transaction"
const SensitivityCaptureAll = 0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InternalTracer ¶
type InternalTracer struct {
// contains filtered or unexported fields
}
func (*InternalTracer) Extract ¶
func (t *InternalTracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error)
func (*InternalTracer) Inject ¶
func (t *InternalTracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error
func (*InternalTracer) StartSpan ¶
func (t *InternalTracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
type LogSpan ¶ added in v0.23.1
type LogSpan struct {
// contains filtered or unexported fields
}
func NewLogSpan ¶ added in v0.23.1
func NewLogSpanWithParent ¶ added in v0.23.1
func (*LogSpan) BaggageItem ¶ added in v0.23.1
func (*LogSpan) FinishWithOptions ¶ added in v0.23.1
func (s *LogSpan) FinishWithOptions(opts opentracing.FinishOptions)
func (*LogSpan) LogEventWithPayload ¶ added in v0.23.1
func (*LogSpan) LogKV ¶ added in v0.23.1
func (s *LogSpan) LogKV(alternatingKeyValues ...interface{})
func (*LogSpan) ProduceLog ¶ added in v0.23.1
func (s *LogSpan) ProduceLog()
func (*LogSpan) SetBaggageItem ¶ added in v0.23.1
func (*LogSpan) SetOperationName ¶ added in v0.23.1
type LogTracer ¶ added in v0.23.1
type LogTracer struct {
// contains filtered or unexported fields
}
LogTracer is the implementation of the Tracer interface which passes all the traces back to the passed logger and print them this is mostly useful for debugging and testing
func NewLogTracer ¶ added in v0.23.1
LogTracer creates a new tracer.
func (*LogTracer) RecordSpanFromParent ¶ added in v0.23.1
func (*LogTracer) StartBlockSpan ¶ added in v0.23.1
func (*LogTracer) StartCollectionSpan ¶ added in v0.23.1
func (*LogTracer) StartSpanFromContext ¶ added in v0.23.1
func (*LogTracer) StartSpanFromParent ¶ added in v0.23.1
func (*LogTracer) StartTransactionSpan ¶ added in v0.23.1
func (t *LogTracer) StartTransactionSpan( ctx context.Context, transactionID flow.Identifier, spanName SpanName, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context, bool)
StartTransactionSpan starts a span that will be aggregated under the given transaction. All spans for the same transaction will be aggregated under a root span
func (*LogTracer) WithSpanFromContext ¶ added in v0.23.1
func (t *LogTracer) WithSpanFromContext(ctx context.Context, operationName SpanName, f func(), opts ...opentracing.StartSpanOption)
WithSpanFromContext encapsulates executing a function within an span, i.e., it starts a span with the specified SpanName from the context, executes the function f, and finishes the span once the function returns.
type NoopSpan ¶
type NoopSpan struct {
// contains filtered or unexported fields
}
func (*NoopSpan) BaggageItem ¶
func (*NoopSpan) FinishWithOptions ¶
func (s *NoopSpan) FinishWithOptions(opts opentracing.FinishOptions)
func (*NoopSpan) LogEventWithPayload ¶
func (*NoopSpan) SetBaggageItem ¶
func (*NoopSpan) SetOperationName ¶
type NoopSpanContext ¶
type NoopSpanContext struct{}
func (*NoopSpanContext) ForeachBaggageItem ¶
func (c *NoopSpanContext) ForeachBaggageItem(handler func(k, v string) bool)
type NoopTracer ¶
type NoopTracer struct {
// contains filtered or unexported fields
}
NoopTracer is the implementation of the Tracer interface
func (*NoopTracer) Done ¶
func (t *NoopTracer) Done() <-chan struct{}
Done returns a channel that will close when shutdown is complete.
func (*NoopTracer) Ready ¶
func (t *NoopTracer) Ready() <-chan struct{}
Ready returns a channel that will close when the network stack is ready.
func (*NoopTracer) RecordSpanFromParent ¶ added in v0.14.5
func (t *NoopTracer) RecordSpanFromParent( span opentracing.Span, operationName SpanName, duration time.Duration, logs []opentracing.LogRecord, opts ...opentracing.StartSpanOption, )
func (*NoopTracer) StartBlockSpan ¶ added in v0.22.0
func (t *NoopTracer) StartBlockSpan( ctx context.Context, entityID flow.Identifier, spanName SpanName, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context, bool)
func (*NoopTracer) StartCollectionSpan ¶ added in v0.22.0
func (t *NoopTracer) StartCollectionSpan( ctx context.Context, entityID flow.Identifier, spanName SpanName, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context, bool)
func (*NoopTracer) StartSpanFromContext ¶
func (*NoopTracer) StartSpanFromParent ¶
func (t *NoopTracer) StartSpanFromParent( span opentracing.Span, operationName SpanName, opts ...opentracing.StartSpanOption, ) opentracing.Span
func (*NoopTracer) StartTransactionSpan ¶ added in v0.22.0
func (t *NoopTracer) StartTransactionSpan( ctx context.Context, entityID flow.Identifier, spanName SpanName, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context, bool)
func (*NoopTracer) WithSpanFromContext ¶ added in v0.15.0
func (t *NoopTracer) WithSpanFromContext(ctx context.Context, operationName SpanName, f func(), opts ...opentracing.StartSpanOption)
type OpenTracer ¶
type OpenTracer struct { opentracing.Tracer // contains filtered or unexported fields }
OpenTracer is the implementation of the Tracer interface
func NewTracer ¶
func NewTracer(log zerolog.Logger, serviceName string, chainID string, sensitivity uint) (*OpenTracer, error)
NewTracer creates a new tracer.
TODO (ramtin) : we might need to add a mutex lock (not sure if tracer itself is thread-safe)
func (*OpenTracer) Done ¶
func (t *OpenTracer) Done() <-chan struct{}
Done returns a channel that will close when shutdown is complete.
func (*OpenTracer) Ready ¶
func (t *OpenTracer) Ready() <-chan struct{}
Ready returns a channel that will close when the network stack is ready.
func (*OpenTracer) RecordSpanFromParent ¶ added in v0.14.5
func (t *OpenTracer) RecordSpanFromParent( span opentracing.Span, operationName SpanName, duration time.Duration, logs []opentracing.LogRecord, opts ...opentracing.StartSpanOption, )
func (*OpenTracer) StartBlockSpan ¶ added in v0.22.0
func (t *OpenTracer) StartBlockSpan( ctx context.Context, blockID flow.Identifier, spanName SpanName, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context, bool)
func (*OpenTracer) StartCollectionSpan ¶ added in v0.22.0
func (t *OpenTracer) StartCollectionSpan( ctx context.Context, collectionID flow.Identifier, spanName SpanName, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context, bool)
func (*OpenTracer) StartSpanFromContext ¶
func (*OpenTracer) StartSpanFromParent ¶
func (t *OpenTracer) StartSpanFromParent( span opentracing.Span, operationName SpanName, opts ...opentracing.StartSpanOption, ) opentracing.Span
func (*OpenTracer) StartTransactionSpan ¶ added in v0.22.0
func (t *OpenTracer) StartTransactionSpan( ctx context.Context, transactionID flow.Identifier, spanName SpanName, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context, bool)
StartTransactionSpan starts a span that will be aggregated under the given transaction. All spans for the same transaction will be aggregated under a root span
func (*OpenTracer) WithSpanFromContext ¶ added in v0.15.0
func (t *OpenTracer) WithSpanFromContext(ctx context.Context, operationName SpanName, f func(), opts ...opentracing.StartSpanOption)
WithSpanFromContext encapsulates executing a function within an span, i.e., it starts a span with the specified SpanName from the context, executes the function f, and finishes the span once the function returns.
type SpanName ¶
type SpanName string
const ( // Extend ProtoStateMutatorExtend SpanName = "proto.state.mutator.extend" ProtoStateMutatorExtendCheckHeader SpanName = "proto.state.mutator.extend.checkHeader" ProtoStateMutatorExtendCheckGuarantees SpanName = "proto.state.mutator.extend.checkGuarantees" ProtoStateMutatorExtendCheckSeals SpanName = "proto.state.mutator.extend.checkSeals" ProtoStateMutatorExtendCheckReceipts SpanName = "proto.state.mutator.extend.checkReceipts" ProtoStateMutatorExtendDBInsert SpanName = "proto.state.mutator.extend.dbInsert" // HeaderExtend ProtoStateMutatorHeaderExtend SpanName = "proto.state.mutator.headerExtend" ProtoStateMutatorHeaderExtendGetLastSealed SpanName = "proto.state.mutator.headerExtend.lastSealed" // mutator.Finalize ProtoStateMutatorFinalize SpanName = "proto.state.mutator.finalize" // Builder CONBuilderBuildOn SpanName = "con.builder.buildOn" // Finalizer CONFinalizerFinalizeBlock SpanName = "con.finalizer.finalizeBlock" // Ingestion CONIngOnCollectionGuarantee SpanName = "con.ingestion.onCollectionGuarantee" // Compliance CONCompOnBlockProposal SpanName = "con.compliance.onBlockProposal" ConCompProcessBlockProposal SpanName = "con.compliance.processBlockProposal" CONCompOnBlockVote SpanName = "con.compliance.onBlockVote" // Matching CONMatchProcessReceipt SpanName = "con.matching.processReceipt" CONMatchProcessReceiptVal SpanName = "con.matching.processReceipt.validation" // Sealing CONSealingProcessFinalizedBlock SpanName = "con.sealing.processFinalizedBlock" CONSealingCheckForEmergencySealableBlocks SpanName = "con.sealing.processFinalizedBlock.checkEmergencySealing" CONSealingPruning SpanName = "con.sealing.processFinalizedBlock.pruning" CONSealingRequestingPendingApproval SpanName = "con.sealing.processFinalizedBlock.requestPendingApprovals" CONSealingProcessIncorporatedResult SpanName = "con.sealing.processIncorporatedResult" CONSealingProcessApproval SpanName = "con.sealing.processApproval" //Follower Engine FollowerOnBlockProposal SpanName = "follower.onBlockProposal" FollowerProcessBlockProposal SpanName = "follower.processBlockProposal" FollowerProcessPendingChildren SpanName = "follower.processPendingChildren" // Builder COLBuildOn SpanName = "col.builder" COLBuildOnSetup SpanName = "col.builder.setup" COLBuildOnUnfinalizedLookup SpanName = "col.builder.unfinalizedLookup" COLBuildOnFinalizedLookup SpanName = "col.builder.finalizedLookup" COLBuildOnCreatePayload SpanName = "col.builder.createPayload" COLBuildOnCreateHeader SpanName = "col.builder.createHeader" COLBuildOnDBInsert SpanName = "col.builder.dbInsert" // Cluster State COLClusterStateMutatorExtend SpanName = "col.state.mutator.extend" COLClusterStateMutatorExtendSetup SpanName = "col.state.mutator.extend.setup" COLClusterStateMutatorExtendCheckAncestry SpanName = "col.state.mutator.extend.ancestry" COLClusterStateMutatorExtendCheckTransactionsValid SpanName = "col.state.mutator.extend.transactions.validity" COLClusterStateMutatorExtendCheckTransactionsDupes SpanName = "col.state.mutator.extend.transactions.dupes" COLClusterStateMutatorExtendDBInsert SpanName = "col.state.mutator.extend.dbInsert" EXEHandleBlock SpanName = "exe.ingestion.handleBlock" EXEHandleCollection SpanName = "exe.ingestion.handleCollection" EXEHandleComputationResult SpanName = "exe.ingestion.handleComputationResult" EXEExecuteBlock SpanName = "exe.ingestion.executeBlock" EXESaveExecutionResults SpanName = "exe.ingestion.saveExecutionResults" EXEBroadcastExecutionReceipt SpanName = "exe.provider.broadcastExecutionReceipt" EXEComputeBlock SpanName = "exe.computer.computeBlock" EXEComputeCollection SpanName = "exe.computer.computeCollection" EXEComputeSystemCollection SpanName = "exe.computer.computeSystemCollection" EXEComputeTransaction SpanName = "exe.computer.computeTransaction" EXERunTransaction SpanName = "exe.computer.runTransaction" EXEMergeTransactionView SpanName = "exe.computer.mergeTransactionView" EXEStateSaveExecutionResults SpanName = "exe.state.saveExecutionResults" EXECommitDelta SpanName = "exe.state.commitDelta" EXEGetRegisters SpanName = "exe.state.getRegisters" EXEGetRegistersWithProofs SpanName = "exe.state.getRegistersWithProofs" EXEGetExecutionResultID SpanName = "exe.state.getExecutionResultID" EXEUpdateHighestExecutedBlockIfHigher SpanName = "exe.state.updateHighestExecutedBlockIfHigher" EXEHashEvents SpanName = "exe.state.hashEvents" // Verification node // // assigner engine VERProcessFinalizedBlock SpanName = "ver.processFinalizedBlock" // children of VERProcessFinalizedBlock VERAssignerHandleFinalizedBlock SpanName = "ver.assigner.handleFinalizedBlock" VERAssignerHandleExecutionReceipt SpanName = "ver.assigner.handleExecutionReceipt" VERAssignerChunkAssignment SpanName = "ver.assigner.chunkAssignment" VERAssignerProcessChunk SpanName = "ver.assigner.processChunk" // fetcher engine VERProcessAssignedChunk SpanName = "ver.processAssignedChunk" // children of VERProcessAssignedChunk VERFetcherHandleAssignedChunk SpanName = "ver.fetcher.handleAssignedChunk" VERFetcherHandleChunkDataPack SpanName = "ver.fetcher.handleChunkDataPack" VERFetcherValidateChunkDataPack SpanName = "ver.fetcher.validateChunkDataPack" VERFetcherPushToVerifier SpanName = "ver.fetcher.pushToVerifier" // requester engine VERProcessChunkDataPackRequest SpanName = "ver.processChunkDataPackRequest" // children of VERProcessChunkDataPackRequest VERRequesterHandleChunkDataRequest SpanName = "ver.requester.handleChunkDataRequest" VERRequesterHandleChunkDataResponse SpanName = "ver.requester.handleChunkDataResponse" VERRequesterDispatchChunkDataRequest SpanName = "ver.requester.dispatchChunkDataRequest" VERProcessExecutionReceipt SpanName = "ver.processExecutionReceipt" // children of VERProcessExecutionReceipt VERFindHandleExecutionReceipt SpanName = "ver.find.handleExecutionReceipt" VERFindOnFinalizedBlock SpanName = "ver.finder.OnFinalizedBlock" VERFindCheckCachedReceipts SpanName = "ver.finder.checkCachedReceipts" VERFindCheckPendingReceipts SpanName = "ver.finder.checkPendingReceipts" VERFindCheckReadyReceipts SpanName = "ver.finder.checkReadyReceipts" VERFindProcessResult SpanName = "ver.finder.processResult" VERFindOnResultProcessed SpanName = "ver.finder.onResultProcessed" VERProcessExecutionResult SpanName = "ver.processExecutionResult" // children of VERProcessExecutionResult VERMatchHandleExecutionResult SpanName = "ver.match.handleExecutionResult" VERMatchHandleChunkDataPack SpanName = "ver.match.handleChunkDataPack" VERMatchMyChunkAssignments SpanName = "ver.match.myChunkAssignments" VERVerVerifyWithMetrics SpanName = "ver.verify.verifyWithMetrics" VERVerChunkVerify SpanName = "ver.verify.ChunkVerifier.Verify" VERVerGenerateResultApproval SpanName = "ver.verify.GenerateResultApproval" // Flow Virtual Machine FVMVerifyTransaction SpanName = "fvm.verifyTransaction" FVMSeqNumCheckTransaction SpanName = "fvm.seqNumCheckTransaction" FVMExecuteTransaction SpanName = "fvm.executeTransaction" FVMDeductTransactionFees SpanName = "fvm.deductTransactionFees" FVMInvokeContractFunction SpanName = "fvm.invokeContractFunction" FVMFrozenAccountCheckTransaction SpanName = "fvm.frozenAccountCheckTransaction" FVMEnvHash SpanName = "fvm.env.Hash" FVMEnvValueExists SpanName = "fvm.env.valueExists" FVMEnvGetValue SpanName = "fvm.env.getValue" FVMEnvSetValue SpanName = "fvm.env.setValue" FVMEnvGetStorageUsed SpanName = "fvm.env.getStorageUsed" FVMEnvGetStorageCapacity SpanName = "fvm.env.getStorageCapacity" FVMEnvGetAccountBalance SpanName = "fvm.env.getAccountBalance" FVMEnvResolveLocation SpanName = "fvm.env.resolveLocation" FVMEnvGetCode SpanName = "fvm.env.getCode" FVMEnvGetAccountContractNames SpanName = "fvm.env.getAccountContractNames" FVMEnvGetProgram SpanName = "fvm.env.getCachedProgram" FVMEnvSetProgram SpanName = "fvm.env.cacheProgram" FVMEnvProgramLog SpanName = "fvm.env.programLog" FVMEnvEmitEvent SpanName = "fvm.env.emitEvent" FVMEnvGenerateUUID SpanName = "fvm.env.generateUUID" FVMEnvDecodeArgument SpanName = "fvm.env.decodeArgument" FVMEnvVerifySignature SpanName = "fvm.env.verifySignature" FVMEnvGetCurrentBlockHeight SpanName = "fvm.env.getCurrentBlockHeight" FVMEnvUnsafeRandom SpanName = "fvm.env.unsafeRandom" FVMEnvGetBlockAtHeight SpanName = "fvm.env.getBlockAtHeight" FVMEnvCreateAccount SpanName = "fvm.env.createAccount" FVMEnvAddAccountKey SpanName = "fvm.env.addAccountKey" FVMEnvGetAccountKey SpanName = "fvm.env.getAccountKey" FVMEnvRemoveAccountKey SpanName = "fvm.env.removeAccountKey" FVMEnvUpdateAccountContractCode SpanName = "fvm.env.updateAccountContractCode" FVMEnvGetAccountContractCode SpanName = "fvm.env.getAccountContractCode" FVMEnvRemoveAccountContractCode SpanName = "fvm.env.removeAccountContractCode" FVMEnvGetSigningAccounts SpanName = "fvm.env.getSigningAccounts" FVMCadenceTrace SpanName = "fvm.cadence.trace" )
Span names