Azure / Azure/adx-mon

Rename ingestor-prefixed connection metrics shared with collector

Open
#1,142 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
28
Forks
17
Avg merge
11h 40m
Merged PRs (30d)
42

Description

## Problem

Two Prometheus metrics carry the `ingestor` subsystem in their names but are populated by both the ingestor and the collector:

- `adxmon_ingestor_active_connections` (gauge) — Go var `metrics.IngestorActiveConnections`
- `adxmon_ingestor_dropped_connections_total` (counter) — Go var `metrics.IngestorDroppedConnectionsTotal`

Both are incremented in `pkg/limiter/listener.go`, which is wired up by `pkg/http.NewServer`. That HTTP server is used by the collector as well as the ingestor, so both processes emit these metrics. The names are misleading and the collector's `Status` log line scans for them by their ingestor-prefixed names (see `collector/metrics/service.go`).

## Proposal

Rename the metrics and variables to something process-neutral, e.g.:

- `adxmon_server_active_connections`
- `adxmon_server_dropped_connections_total`

Update the Go variable names (`ServerActiveConnections`, `ServerDroppedConnectionsTotal`) and the substring matches in `collector/metrics/service.go` and `ingestor/metrics/service.go` accordingly.

## Compatibility

This is a breaking change for any dashboards or alerts that reference the existing metric names. We should:

1. Audit dashboards under `dashboards/` and `build/k8s/dashboards/` for references.
2. Coordinate the rename with any external consumers / Kusto ingestion mappings if applicable.

## Context

Discovered while cleaning up the per-process Status log lines (branch `cleanup/remove-dead-ingestor-samples-logging`). Decided to leave the rename for a separate change since the existing metric is populated correctly — only the name is misleading.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with pkg/limiter/listener.go and the metrics variables, then trace the matching logic in collector/metrics/service.go and ingestor/metrics/service.go. Audit dashboards under dashboards/ and build/k8s/dashboards/ for the existing metric names, and check whether external consumers or Kusto ingestion mappings are affected. Done means the process-neutral names and variables are used consistently and the dashboard and compatibility impact is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.