agentleFS
Microsoft AzureKnown publisherAzure/jaeger-kusto/.github/copilot-instructions.md

jaeger-kusto

Copilot instructions2 starsChanged 9 months agoApache-2.0View on GitHub

This plugin exists to provide a Jaeger UI for traces that are collected via the OpenTelemetry Collector and stored in Azure Data Explorer (Kusto). It is a read-only bridge — the OTEL Collector's ADX exporter handles ingestion; this plugin only queries Kusto to render traces in Jaeger. It does not collect or store metrics itself; the metrics/ package is a PromQL translation shim that computes RED metrics on-the-fly from the same trace data in Kusto. It implements shared.StoragePlugin from Jaeger's…

  • Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.

    Of the Copilot instructions files we read, the 2,336 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

We split this copilot-instructions.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Kusto struct mapping: Use kusto:"ColumnName" struct tags for row deserialization via row.ToStruct().

    line 79

≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Copilot Instructions for jaeger-kusto

Build, Test, and Lint

# Build
go build -v -o jaeger-kusto

# Lint
golangci-lint run

# Unit tests (all packages)
go test ./... -count=1

# Single package tests
go test ./metrics/... -count=1
go test ./store/... -count=1
go test ./config/... -count=1

# Single test
go test ./metrics/... -run TestParsePromQL_Latency -count=1

# Integration tests (requires Kusto cluster connection)
go test -v --tags=integration -timeout 300s ./test/...

Docker & Docker Compose

# Build Docker image
docker build -f build/server/Dockerfile -t jaeger-kusto .

# Run locally with docker-compose (requires jaeger-kusto-config.json in repo root)
docker compose -f build/server/docker-compose.yml up --build
# Jaeger UI at http://localhost:16686, metrics shim at :9090

Helm

# Deploy to Kubernetes (customize build/server/helm/values.yaml first)
helm install jaeger-kusto build/server/helm/ -n <namespace>

# Upgrade
helm upgrade jaeger-kusto build/server/helm/ -n <namespace>

Architecture

This plugin exists to provide a Jaeger UI for traces that are collected via the OpenTelemetry Collector and stored in Azure Data Explorer (Kusto). It is a read-only bridge — the OTEL Collector's ADX exporter handles ingestion; this plugin only queries Kusto to render traces in Jaeger. It does not collect or store metrics itself; the metrics/ package is a PromQL translation shim that computes RED metrics on-the-fly from the same trace data in Kusto.

It implements shared.StoragePlugin from Jaeger's gRPC plugin framework. The SpanWriter is a no-op.

Data Flow

Jaeger UI → Jaeger Query → gRPC → runner/ → store/ → Kusto (OTELTraces table)
                                                        ↑
Jaeger V2 Monitor tab → PromQL → metrics/ ──────────────┘
                                  (HTTP shim)   (SpanMetrics materialized view)

Key Packages

  • store/ — Jaeger SpanReader/DependencyReader backed by Kusto. Reads query the OTELTraces table via KQL. The SpanWriter is a no-op (ingestion is handled by the OTEL exporter).
  • runner/ — Startup logic. Two modes: servePlugin (Jaeger V1 hashicorp/go-plugin over stdio) or serveServer (standalone gRPC server when remoteMode: true).
  • config/ — Two config files parsed by Viper: a plugin config (JSON, --config flag) and a Kusto config (JSON, path set in plugin config via kustoConfigPath). Environment variables override plugin config with prefix JAEGER_KUSTO_PLUGIN.
  • metrics/ — PromQL shim HTTP server for Jaeger V2 SPM/RED metrics. Parses Jaeger's PromQL queries (3 fixed patterns: latency histogram, call rate, error rate), translates them to KQL, and returns Prometheus-compatible JSON responses. Can query a pre-computed SpanMetrics materialized view or fall back to raw OTELTraces. Enabled via metricsEnabled in plugin config.

Kusto Client Pattern

store.NewKustoClient() handles auth (AAD app key, managed identity, or workload identity). The kustoFactory provides a reader client (kusto.Client.Query). The same auth pattern is replicated for the metrics reader.

Conventions

  • Logging: hashicorp/go-hclog throughout — not log or zap.
  • Testing: stretchr/testify for assertions (assert/require). Integration tests use //go:build integration tags and live in test/. Unit tests live alongside source files.
  • KQL queries: Built using kusto/kql builder with parameterized queries (kql.NewParameters()). Tag filters use AddUnsafe for dynamic key interpolation.
  • Kusto struct mapping: Use kusto:"ColumnName" struct tags for row deserialization via row.ToStruct().
  • Config loading: JSON files parsed via Viper (viper.SetConfigType("json")), with environment variable overrides using the JAEGER_KUSTO_PLUGIN_ prefix.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.