agentleFS
Microsoft AzureKnown publisherAzure/serilog-sinks-azuredataexplorer/.github/copilot-instructions.md

serilog-sinks-azuredataexplorer

Copilot instructions6 starsChanged 5 months agoMITView on GitHub

This is a Serilog sink that ships structured logs to Azure Data Explorer (Kusto). It is a NuGet library owned by Microsoft. This project uses Central Package Management. All package versions are in src/Directory.Packages.props. Individual .csproj files reference packages without versions. Key rules: - Never add Version= to PackageReference elements in .csproj files — that causes error NU1008 - All version changes go to src/Directory.Packages.props - Some packages have TFM-conditional versions (e.g., System.Text.Json is 8.0.0 for net6.0 and 9.0.0 for…

  • 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

3 rules. About 0 are common, 0 are distinctive, and 3 are 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.

  • 3

    Very specific

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

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

    Never add Version= to PackageReference elements in .csproj files — that causes error NU1008

    line 20
  2. Very specific:

    All version changes go to src/Directory.Packages.props

    line 21
  3. Very specific:

    When upgrading packages, use the agentic skill: .github/prompts/update-versions.prompt.md

    line 58

≈ “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 — Serilog.Sinks.AzureDataExplorer

Project Overview

This is a Serilog sink that ships structured logs to Azure Data Explorer (Kusto). It is a NuGet library owned by Microsoft.

Architecture

  • Main library: src/Serilog.Sinks.AzureDataExplorer/ — multi-targeted (net9.0, net8.0, net6.0, netstandard2.0, net471, net462)
  • Tests: src/Serilog.Sinks.AzureDataExplorer.Tests/ — xUnit (net6.0, net8.0)
  • Samples: src/Serilog.Sinks.AzureDataExplorer.Samples/ — console demo app
  • Strong-named with adxSerilog.snk
  • Two ingestion modes: Batched (in-memory → Kusto) and Durable (file buffer → ship to Kusto)

Central Package Management

This project uses Central Package Management. All package versions are in src/Directory.Packages.props. Individual .csproj files reference packages without versions.

Key rules:

  • Never add Version= to PackageReference elements in .csproj files — that causes error NU1008
  • All version changes go to src/Directory.Packages.props
  • Some packages have TFM-conditional versions (e.g., System.Text.Json is 8.0.0 for net6.0 and 9.0.0 for net8.0) — preserve these conditions
  • The test project overrides FluentAssertions via PackageVersion Update= in its .csproj — this is intentional

Shared Build Properties

src/Directory.Build.props contains shared MSBuild properties including:

  • TargetFrameworks
  • Version, AssemblyVersion, FileVersion
  • Package metadata (Authors, Description, License)

Hardcoded Versions

src/Serilog.Sinks.AzureDataExplorer/Extensions/AzureDataExplorerSinkOptionsExtensions.cs has ClientVersion = "2.0.4" — this must be updated manually when releasing new versions.

Build & Test

# From src/ directory
dotnet build
dotnet test Serilog.Sinks.AzureDataExplorer.Tests/Serilog.Sinks.AzureDataExplorer.Tests.csproj

Test Tiers

  • Tier 1 — Unit tests: Self-contained, no setup needed. Use --filter "FullyQualifiedName!~E2E&FullyQualifiedName!~AppSettings" to run only these.
  • Tier 2 — E2E tests: Require a live ADX cluster. Fail with KustoClientTimeoutException or AuthenticationFailedException if prerequisites are missing.

E2E test prerequisites (all required):

  1. az login (uses AzureCliCredential)
  2. Three environment variables: ingestionURI, databaseName, tenant
  3. Network access to the cluster (VPN required for internal/PPE clusters)

See .github/prompts/update-versions.prompt.md for the full E2E setup guide and the agentic upgrade skill.

Dependency Upgrade Guidance

When upgrading packages, use the agentic skill: .github/prompts/update-versions.prompt.md

Copilot CLI: from the repo root, run copilot, then /plan Follow the upgrade skill at @.github/prompts/update-versions.prompt.md. Pre-approve dotnet/git tools with copilot --allow-tool 'shell(dotnet:*)' --allow-tool 'shell(git:*)'

VS Code agent mode: reference the file as #update-versions and send.

Key constraints:

  • TFM-conditional packages (System., Microsoft.Extensions.) must keep version-to-TFM alignment: net6.0 → 8.0.x, net8.0 → 8.0.x or 9.0.x, net9.0 → 9.0.x
  • Serilog ecosystem packages are TFM-agnostic — same version for all targets
  • The Kusto SDK (Microsoft.Azure.Kusto.Ingest) pulls many transitive deps — check for conflicts after upgrading
  • FluentAssertions 7.x has major breaking changes — stay on 6.x unless ready to fix tests
  • net6.0 is EOL (Nov 2024) — suppress warnings with SuppressTfmSupportBuildWarnings or migrate to net8.0

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.