Azure / Azure/adx-mon

Migrate Kusto-to-metrics transformer off legacy kusto/data/value types

Open
#1,189 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

## Context
The Kusto-to-metrics transform still depends on legacy `github.com/Azure/azure-kusto-go/kusto/data/value` wrapper types.

This area does not create Kusto clients or execute queries; it handles the shape of values materialized from old Kusto row iterators.

## Files
- `transform/kusto_to_metrics.go`
- `transform/kusto_to_metrics_test.go`

## Current legacy usage
The transformer handles old typed values in result maps, including:

- `value.String`
- `value.Long`
- `value.Real`
- `value.Int`
- `value.DateTime`

It checks `Valid` flags and converts these wrappers into:

- metric names
- numeric metric values
- timestamps
- label values

## Migration considerations
This may be easiest after the ADX exporter row materialization changes, because `QueryExecutor.iteratorToRows` currently determines what concrete value types enter the transformer.

## Acceptance criteria
- Transformer production code no longer imports `github.com/Azure/azure-kusto-go/kusto/data/value`.
- Tests cover the value shapes produced by the migrated `azkustodata` query path.
- Invalid/null Kusto value behavior remains explicit and tested.
- Existing plain Go value support remains intact.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read transform/kusto_to_metrics.go and transform/kusto_to_metrics_test.go first, then inspect QueryExecutor.iteratorToRows to identify the concrete value shapes produced by the migrated azkustodata query path. Run the transformer tests while checking invalid/null behavior and plain Go values. Done means the transformer no longer imports the legacy value package and the migrated shapes and existing behavior are covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go
Domain
backend, data
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
63/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.