tessl install tessl/golang-github-com-prometheus--client-model@0.6.1Data model artifacts for Prometheus
Agent Success
Agent success rate when using this tile
93%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.13x
Baseline
Agent success rate without this tile
82%
Utility for normalizing metric type inputs into the metric-kind enumeration provided by the dependency and validating that downstream payload selections match the chosen kind. Outputs canonical kind strings for consistent wiring into metric families, with MetricKindValue representing the dependency's enum values rather than custom integers.
counter resolves to the corresponding metric-kind enum value. @testGauge-Histogram with a hyphen resolves to the gauge histogram enum value; underscores are treated the same as hyphens. @testthroughput returns an error describing the unsupported type. @testHISTOGRAM, gauge histogram -> GAUGE_HISTOGRAM). @test@generates
// MetricKindValue must align with the metric-kind enum provided by the dependency.
type MetricKindValue int32
type MetricPayloadChoice struct {
Gauge bool
Counter bool
Summary bool
Untyped bool
Histogram bool
}
// ParseMetricKind converts user input (case-insensitive, underscores or hyphens allowed) into a supported metric-kind enum value.
func ParseMetricKind(text string) (MetricKindValue, error)
// CanonicalMetricKind returns the uppercase enum name for a supported metric-kind value.
func CanonicalMetricKind(kind MetricKindValue) (string, error)
// ValidateMetricPayload checks that exactly one payload flag is set and it matches the provided metric kind.
func ValidateMetricPayload(kind MetricKindValue, payload MetricPayloadChoice) error
// IsSupportedMetricKind reports whether the value maps to a known metric kind.
func IsSupportedMetricKind(kind MetricKindValue) boolProvides the metric data model and metric-kind enumeration consumed by these helpers.