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