beholder

package
v0.0.0-...-710d5a7 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// WorkflowExecutionIDShortLen is the length of the short version of the WorkflowExecutionID (label)
	WorkflowExecutionIDShortLen = 3 // first 3 characters, 16^3 = 4.096 possibilities (mid-high cardinality)
)

Variables

This section is empty.

Functions

func ValOrUnknown

func ValOrUnknown(val string) string

This is needed to avoid issues during exporting OTel metrics to Prometheus For more details see https://smartcontract-it.atlassian.net/browse/INFOPLAT-1349 ValOrUnknown returns the value if it is not empty, otherwise it returns "unknown"

func ValShortOrUnknown

func ValShortOrUnknown(val string, _len int) string

ValShortOrUnknown returns the short len value if not empty or available, otherwise it returns "unknown"

Types

type ExecutionMetadata

type ExecutionMetadata struct {
	// Execution Context - Source
	SourceID string
	// Execution Context - Chain
	ChainFamilyName string
	ChainID         string
	NetworkName     string
	NetworkNameFull string
	// Execution Context - Workflow (capabilities.RequestMetadata)
	WorkflowID               string
	WorkflowOwner            string
	WorkflowExecutionID      string
	WorkflowName             string
	WorkflowDonID            uint32
	WorkflowDonConfigVersion uint32
	ReferenceID              string
	// Execution Context - Capability
	CapabilityType           string
	CapabilityID             string
	CapabilityTimestampStart uint32
	CapabilityTimestampEmit  uint32
}

TODO: Refactor as a proto referenced from the other proto files (telemetry messages)

func (ExecutionMetadata) Attributes

func (m ExecutionMetadata) Attributes() []attribute.KeyValue

Attributes returns common attributes used for metrics

type MetricsCapBasic

type MetricsCapBasic struct {
	// contains filtered or unexported fields
}

MetricsCapBasic is a base struct for metrics related to a capability

func NewMetricsCapBasic

func NewMetricsCapBasic(info MetricsInfoCapBasic) (MetricsCapBasic, error)

NewMetricsCapBasic creates a new MetricsCapBasic using the provided MetricsInfoCapBasic

func (*MetricsCapBasic) RecordEmit

func (m *MetricsCapBasic) RecordEmit(ctx context.Context, start, emit uint64, attrKVs ...attribute.KeyValue)

type MetricsInfoCapBasic

type MetricsInfoCapBasic struct {
	// contains filtered or unexported fields
}

MetricInfo is a struct for metrics information

func NewMetricsInfoCapBasic

func NewMetricsInfoCapBasic(metricPrefix, eventRef string) MetricsInfoCapBasic

NewMetricsInfoCapBasic creates a new MetricsInfoCapBasic using the provided event/metric information

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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