Documentation
¶
Index ¶
- Variables
- func Emitter(ctx context.Context) dmetering.EventEmitter
- func HasBackfillerRequest(ctx context.Context) bool
- func IsBackfillerRequest(ctx context.Context) bool
- func Logger(ctx context.Context) *zap.Logger
- func MaxStageLayerParallelExecutor(ctx context.Context) uint64
- func ModuleExecutionTracing(ctx context.Context) bool
- func OutputModuleHash(ctx context.Context) string
- func ReqStats(ctx context.Context) *metrics.Stats
- func Tracer(ctx context.Context) ttrace.Tracer
- func WasmExtensionReqStats(ctx context.Context) metrics.WasmExtensionStats
- func WithBackfillerRequest(ctx context.Context) context.Context
- func WithEmitter(ctx context.Context, emitter dmetering.EventEmitter) context.Context
- func WithModuleExecutionTracing(ctx context.Context) context.Context
- func WithOutputModuleHash(ctx context.Context, hash string) context.Context
- func WithReqStats(ctx context.Context, stats *metrics.Stats) context.Context
- func WithRequest(ctx context.Context, req *RequestDetails) context.Context
- func WithTier2RequestParameters(ctx context.Context, parameters Tier2RequestParameters) context.Context
- func WithTracer(ctx context.Context, tracer ttrace.Tracer) context.Context
- func WithWasmExtensionReqStats(ctx context.Context, stats metrics.WasmExtensionStats) context.Context
- type ISpan
- type IsOutputModuleFunc
- type NoopSpan
- func (n *NoopSpan) AddEvent(string, ...ttrace.EventOption)
- func (n *NoopSpan) End(...ttrace.SpanEndOption)
- func (n *NoopSpan) EndWithErr(e *error)
- func (n *NoopSpan) IsRecording() bool
- func (n *NoopSpan) RecordError(error, ...ttrace.EventOption)
- func (n *NoopSpan) SetAttributes(...attribute.KeyValue)
- func (n *NoopSpan) SetError(bool)
- func (n *NoopSpan) SetName(string)
- func (n *NoopSpan) SetStatus(codes.Code, string)
- func (n *NoopSpan) SpanContext() ttrace.SpanContext
- func (n *NoopSpan) TracerProvider() ttrace.TracerProvider
- type RequestDetails
- func (d *RequestDetails) IsOutputModule(modName string) bool
- func (d *RequestDetails) SetStageLayerParallelExecutorCountFromContext(ctx context.Context)
- func (d *RequestDetails) ShouldReturnWrittenPartials(modName string) bool
- func (d *RequestDetails) ShouldStreamCachedOutputs() bool
- func (d *RequestDetails) UniqueIDString() string
- type Tier2RequestParameters
- type TracingConf
Constants ¶
This section is empty.
Variables ¶
var WithLogger = logging.WithLogger
Functions ¶
func HasBackfillerRequest ¶ added in v1.10.1
func IsBackfillerRequest ¶ added in v1.10.1
func MaxStageLayerParallelExecutor ¶ added in v1.13.0
MaxStageLayerParallelExecutor returns the maximum number of parallel executors (e.g. go routines) that can be executed at the same time for a particular stage's layer as configured and accepted by the auth plugin.
If the request is in development mode, returns 1. If the value is not set, returns the default value which is 2.
func ModuleExecutionTracing ¶ added in v1.1.4
func OutputModuleHash ¶ added in v1.10.9
func WasmExtensionReqStats ¶ added in v1.13.0
func WasmExtensionReqStats(ctx context.Context) metrics.WasmExtensionStats
func WithBackfillerRequest ¶ added in v1.10.1
func WithEmitter ¶ added in v1.6.0
func WithModuleExecutionTracing ¶ added in v1.1.4
func WithOutputModuleHash ¶ added in v1.10.9
func WithRequest ¶
func WithRequest(ctx context.Context, req *RequestDetails) context.Context
func WithTier2RequestParameters ¶ added in v1.5.0
func WithTier2RequestParameters(ctx context.Context, parameters Tier2RequestParameters) context.Context
func WithWasmExtensionReqStats ¶ added in v1.13.0
Types ¶
type ISpan ¶
type ISpan interface {
// End completes the Span. The Span is considered complete and ready to be
// delivered through the rest of the telemetry pipeline after this method
// is called. Therefore, updates to the Span are not allowed after this
// method has been called.
End(options ...ttrace.SpanEndOption)
// AddEvent adds an event with the provided name and options.
AddEvent(name string, options ...ttrace.EventOption)
// IsRecording returns the recording state of the Span. It will return
// true if the Span is active and events can be recorded.
IsRecording() bool
// RecordError will record err as an exception span event for this span. An
// additional call to SetStatus is required if the Status of the Span should
// be set to Error, as this method does not change the Span status. If this
// span is not being recorded or err is nil then this method does nothing.
RecordError(err error, options ...ttrace.EventOption)
// SpanContext returns the SpanContext of the Span. The returned SpanContext
// is usable even after the End method has been called for the Span.
SpanContext() ttrace.SpanContext
// SetStatus sets the status of the Span in the form of a code and a
// description, provided the status hasn't already been set to a higher
// value before (OK > Error > Unset). The description is only included in a
// status when the code is for an error.
SetStatus(code codes.Code, description string)
// SetName sets the Span name.
SetName(name string)
// SetAttributes sets kv as attributes of the Span. If a key from kv
// already exists for an attribute of the Span it will be overwritten with
// the value contained in kv.
SetAttributes(kv ...attribute.KeyValue)
// TracerProvider returns a TracerProvider that can be used to generate
// additional Spans on the same telemetry pipeline as the current Span.
TracerProvider() ttrace.TracerProvider
EndWithErr(e *error)
}
func WithModuleExecutionSpan ¶ added in v1.1.4
type IsOutputModuleFunc ¶ added in v0.1.0
type NoopSpan ¶ added in v1.3.6
type NoopSpan struct{}
NoopSpan is an implementation of span that preforms no operations.
func (*NoopSpan) AddEvent ¶ added in v1.3.6
func (n *NoopSpan) AddEvent(string, ...ttrace.EventOption)
AddEvent does nothing.
func (*NoopSpan) End ¶ added in v1.3.6
func (n *NoopSpan) End(...ttrace.SpanEndOption)
End does nothing.
func (*NoopSpan) EndWithErr ¶ added in v1.3.6
func (*NoopSpan) IsRecording ¶ added in v1.3.6
IsRecording always returns false.
func (*NoopSpan) RecordError ¶ added in v1.3.6
func (n *NoopSpan) RecordError(error, ...ttrace.EventOption)
RecordError does nothing.
func (*NoopSpan) SetAttributes ¶ added in v1.3.6
SetAttributes does nothing.
func (*NoopSpan) SpanContext ¶ added in v1.3.6
func (n *NoopSpan) SpanContext() ttrace.SpanContext
SpanContext returns an empty span context.
func (*NoopSpan) TracerProvider ¶ added in v1.3.6
func (n *NoopSpan) TracerProvider() ttrace.TracerProvider
TracerProvider returns a no-op TracerProvider.
type RequestDetails ¶ added in v0.1.0
type RequestDetails struct {
Modules *pbsubstreams.Modules
DebugInitialStoreSnapshotForModules []string
OutputModule string
// What the user requested, derived from either the Request.StartBlockNum or Request.Cursor
ResolvedStartBlockNum uint64
ResolvedCursor string
LinearHandoffBlockNum uint64
LinearGateBlockNum uint64
StopBlockNum uint64
MaxParallelJobs uint64
MaxStageLayerParallelExecutor uint64
UniqueID uint64
ProductionMode bool
IsTier2Request bool
Tier2Stage int
}
func Details ¶
func Details(ctx context.Context) *RequestDetails
func (*RequestDetails) IsOutputModule ¶ added in v0.1.0
func (d *RequestDetails) IsOutputModule(modName string) bool
func (*RequestDetails) SetStageLayerParallelExecutorCountFromContext ¶ added in v1.13.0
func (d *RequestDetails) SetStageLayerParallelExecutorCountFromContext(ctx context.Context)
SetStageLayerParallelExecutorCountFromContext sets the MaxStageLayerParallelExecutor from the context by first retrieving the dauth trusted headers and then parsing the value from the header, if present.
func (*RequestDetails) ShouldReturnWrittenPartials ¶ added in v1.0.2
func (d *RequestDetails) ShouldReturnWrittenPartials(modName string) bool
func (*RequestDetails) ShouldStreamCachedOutputs ¶ added in v0.1.0
func (d *RequestDetails) ShouldStreamCachedOutputs() bool
func (*RequestDetails) UniqueIDString ¶ added in v1.1.4
func (d *RequestDetails) UniqueIDString() string
type Tier2RequestParameters ¶ added in v1.5.0
type Tier2RequestParameters struct {
MeteringConfig string
FirstStreamableBlock uint64
MergedBlockStoreURL string
StateStoreURL string
StateBundleSize uint64
StateStoreDefaultTag string
BlockType string
WASMModules map[string]string
}
func GetTier2RequestParameters ¶ added in v1.5.0
func GetTier2RequestParameters(ctx context.Context) (Tier2RequestParameters, bool)
type TracingConf ¶ added in v1.1.4
type TracingConf struct {
ModuleExecution bool
}
func NewTracingConf ¶ added in v1.1.4
func NewTracingConf( moduleExecution bool, ) *TracingConf