Documentation
¶
Index ¶
Constants ¶
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 ¶
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 ¶
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 MetricInfo ¶
Define a new struct for metrics information
func (MetricInfo) NewFloat64Gauge ¶
func (m MetricInfo) NewFloat64Gauge(meter metric.Meter) (metric.Float64Gauge, error)
NewFloat64Gauge creates a new Float64Gauge metric
func (MetricInfo) NewInt64Counter ¶
func (m MetricInfo) NewInt64Counter(meter metric.Meter) (metric.Int64Counter, error)
NewInt64Counter creates a new Int64Counter metric
func (MetricInfo) NewInt64Gauge ¶
func (m MetricInfo) NewInt64Gauge(meter metric.Meter) (metric.Int64Gauge, error)
NewInt64Gauge creates a new Int64Gauge metric
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 ¶
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