(store metrix.RuntimeStore)
| 99 | } |
| 100 | |
| 101 | func newRuntimeMetrics(store metrix.RuntimeStore) *runtimeMetrics { |
| 102 | if store == nil { |
| 103 | return nil |
| 104 | } |
| 105 | meter := store.Write().StatefulMeter("netdata.go.plugin.framework.chartengine") |
| 106 | phaseDuration := meter.Vec("phase").Summary( |
| 107 | "build_phase_duration_seconds", |
| 108 | metrix.WithSummaryQuantiles(0.5, 0.9, 0.99), |
| 109 | metrix.WithDescription("Build phase duration in seconds"), |
| 110 | metrix.WithChartFamily("ChartEngine/Build"), |
| 111 | metrix.WithUnit("seconds"), |
| 112 | ) |
| 113 | actions := meter.Vec("kind").Counter( |
| 114 | "planner_actions_total", |
| 115 | metrix.WithDescription("Planner actions by kind"), |
| 116 | metrix.WithChartFamily("ChartEngine/Actions"), |
| 117 | metrix.WithUnit("actions"), |
| 118 | ) |
| 119 | lifecycleRemoved := meter.Vec("scope", "reason").Counter( |
| 120 | "lifecycle_removed_total", |
| 121 | metrix.WithDescription("Lifecycle removals by scope and reason"), |
| 122 | metrix.WithChartFamily("ChartEngine/Lifecycle"), |
| 123 | metrix.WithUnit("removals"), |
| 124 | ) |
| 125 | seriesFiltered := meter.Vec("reason").Counter( |
| 126 | "series_filtered_total", |
| 127 | metrix.WithDescription("Series filtered before routing by reason"), |
| 128 | metrix.WithChartFamily("ChartEngine/Series"), |
| 129 | metrix.WithUnit("series"), |
| 130 | ) |
| 131 | buildSeqTransitions := meter.Vec("transition").Counter( |
| 132 | "build_seq_transitions_total", |
| 133 | metrix.WithDescription("Build sequence monotonicity transitions"), |
| 134 | metrix.WithChartFamily("ChartEngine/Build"), |
| 135 | metrix.WithUnit("transitions"), |
| 136 | ) |
| 137 | return &runtimeMetrics{ |
| 138 | buildSuccessTotal: metrix.SeededCounter(meter, |
| 139 | "build_success_total", |
| 140 | metrix.WithDescription("Successful BuildPlan calls"), |
| 141 | metrix.WithChartFamily("ChartEngine/Build"), |
| 142 | metrix.WithUnit("builds"), |
| 143 | ), |
| 144 | buildErrorTotal: metrix.SeededCounter(meter, |
| 145 | "build_error_total", |
| 146 | metrix.WithDescription("Failed BuildPlan calls"), |
| 147 | metrix.WithChartFamily("ChartEngine/Build"), |
| 148 | metrix.WithUnit("builds"), |
| 149 | ), |
| 150 | buildSkippedFailedTotal: metrix.SeededCounter(meter, |
| 151 | "build_skipped_failed_collect_total", |
| 152 | metrix.WithDescription("BuildPlan calls skipped due failed collect cycle"), |
| 153 | metrix.WithChartFamily("ChartEngine/Build"), |
| 154 | metrix.WithUnit("builds"), |
| 155 | ), |
| 156 | buildDurationSeconds: meter.Summary( |
| 157 | "build_duration_seconds", |
| 158 | metrix.WithSummaryQuantiles(0.5, 0.9, 0.99), |
no test coverage detected
searching dependent graphs…