package
0.40.0
Repository: https://github.com/radius-project/radius.git
Documentation: pkg.go.dev

# README

Prometheus Metrics Usage

  1. For number of requests, use value as 1 for each request:

    metric.Must(global.GetMeterProvider().Meter("radius-rp")).NewInt64ValueRecorder(requestMetricName, metric.WithUnit(unit.Dimensionless)).Record(r.Context(), int64(1))

  2. To record latency:

    metric.Must(global.GetMeterProvider().Meter("radius-rp")).NewInt64Counter(metricName, metric.WithUnit(unit.millisecond)).Add(ctx, int64(val), labels...)

  3. To use a gauge, define a call back function:

    callback := func(v int) metric.Int64ObserverFunc { return metric.Int64ObserverFunc(func(_ context.Context, result metric.Int64ObserverResult) { result.Observe(int64(v), labels...) }) }(val)

    getMeterMust().NewInt64ValueObserver(metricName, callback).Observation(int64(val))

# Packages

No description provided by the author
No description provided by the author

# Functions

InitMetrics initializes metrics for Radius.
NewRecipeAttributes generates common attributes for recipe operations.

# Constants

AsyncOperationDuration is the metric name for async operation duration.
AsyncOperationCount is the metric name for async operation count.
ExtendedAsyncOperationCount is the metric name for extended async operation count.
FailedOperationState is the value for a failed operation state.
OperationStateAttrKey is the attribute name for the operation state.
QueuedAsyncOperationCount is the metric name for queued async operation count.
RecipeEngineOperationDelete represents the Delete operation of the Recipe Engine.
RecipeEngineOperationDownloadRecipe represents the Download Recipe operation of the Recipe Engine.
RecipeEngineOperationExecute represents the Execute operation of the Recipe Engine.
RecipeEngineOperationGC represents the Garbage Collection operation of the Recipe Engine.
SuccessfulOperationState is the value for a successful operation state.
TerraformVersionAttrKey is the attribute key for the Terraform version.

# Variables

DefaultAsyncOperationMetrics holds async operation metrics definitions.
DefaultRecipeEngineMetrics holds recipe engine metrics definitions.