Skip to content

feat(tcg): publish the Telemetry Capability Graph as an OTel LogRecord (First-Light step 3) - #14

Merged
ANcpLua merged 2 commits into
mainfrom
feat/tcg-logrecord-publishing
Jun 29, 2026
Merged

feat(tcg): publish the Telemetry Capability Graph as an OTel LogRecord (First-Light step 3)#14
ANcpLua merged 2 commits into
mainfrom
feat/tcg-logrecord-publishing

Conversation

@ANcpLua

@ANcpLua ANcpLua commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

First-Light step 3 — the runtime open-exchange channel (North Star pillar 3). A qyl binary can now publish its Telemetry Capability Graph as a real OpenTelemetry LogRecord at host startup, so any OTLP backend ingests the full declared surface on boot.

New package Qyl.OpenTelemetry.AutoInstrumentation.Publishing:

  • AddQylTelemetryCapabilityGraphPublisher() registers a hosted service that emits the TCG once at startup via ILogger — event qyl.telemetry_capability_graph, body = TCG JSON, attributes qyl.tcg.schema_version + qyl.tcg.capability_count.
  • When the app has OpenTelemetry logging + an OTLP exporter wired, it becomes a true OTLP LogRecord. The exporter stays app-owned and the package takes no OpenTelemetry SDK dependency (narrow Microsoft.Extensions.{Hosting,Logging,DependencyInjection}.Abstractions + core).
  • Opt-in by reference — default behavior unchanged (no fixture drift).

Proof

demos/Qyl.RealTcgPublishingDemo attaches an OTel log processor (exactly where an OTLP exporter sits) and asserts the captured LogRecord matches the binary's own TCG — 60 capabilities, schema 0.1.0-draft. Gated by tools/verify-tcg-publishing-demo.py.

Verification

  • dotnet build …slnx0 warnings / 0 errors
  • verify-tcg-publishing-demo.pytcg-publishing-demo-ok
  • verify-public-api-baseline.pypublic-api-baseline-ok (new package baseline)
  • verify-package-layout.pypackage-layout-ok
  • verify-generator-snapshots.pygenerator-snapshots-ok

Smoketest note (honest): the package-consumer smoketest passes in a normal checkout (verified on main this session), but trips a dotnet pack-inside-a-/tmp-git-worktree quirk in my local build (the Hosting DiagnosticListeners ProjectReference fails to flow into the nuspec when packed from a worktree). This PR touches none of the core/Hosting/DiagnosticListeners consumer path, and CI checks out normally (no worktree) — so CI's smoke legs are the clean confirmation.

🤖 Generated with Claude Code

…d (First-Light step 3)

New Qyl.OpenTelemetry.AutoInstrumentation.Publishing package — the runtime open-exchange channel
(North Star pillar 3). AddQylTelemetryCapabilityGraphPublisher() registers a hosted service that emits
the TCG once at host startup via ILogger (event qyl.telemetry_capability_graph, body = TCG JSON,
attributes qyl.tcg.schema_version + qyl.tcg.capability_count). When the app has OpenTelemetry logging +
an OTLP exporter wired, it becomes a true OTLP LogRecord; the exporter stays app-owned and the package
takes NO OpenTelemetry SDK dependency (narrow Microsoft.Extensions.{Hosting,Logging,DependencyInjection}
.Abstractions + core).

Proven end-to-end by demos/Qyl.RealTcgPublishingDemo + tools/verify-tcg-publishing-demo.py: an OTel log
processor captures a LogRecord that matches the binary's own TCG (60 capabilities, schema 0.1.0-draft).

- Publishing package + PublicAPI baselines; CPM adds Microsoft.Extensions.Hosting.Abstractions; project
  and demo registered in the slnx.
- Exchange spec publication-channel 2 + AGENTS.md status updated (First-Light steps 1-3 shipped).

Verified: full solution build 0/0; tcg-publishing-demo-ok; public-api-baseline-ok; package-layout-ok;
generator-snapshots-ok.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fff2805b-2c93-461c-a51b-1c604cab7541

📥 Commits

Reviewing files that changed from the base of the PR and between 8541d64 and 9221596.

📒 Files selected for processing (3)
  • demos/Qyl.RealTcgPublishingDemo/Program.cs
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs
  • tools/verify-tcg-publishing-demo.py
📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: smoke (qyl-macos)
  • GitHub Check: smoke (qyl-linux)
🧰 Additional context used
📓 Path-based instructions (3)
src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/**

📄 CodeRabbit inference engine (AGENTS.md)

Keep Telemetry Capability Graph runtime publishing in Qyl.OpenTelemetry.AutoInstrumentation.Publishing; it must remain opt-in, ILogger-based, and free of an OTel SDK dependency in qyl.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs
**

⚙️ CodeRabbit configuration file

AGENTS.md

**: # Qyl.OpenTelemetry.AutoInstrumentation agent rules

Mission

This repository is the runtime AOT auto-instrumentation lane for qyl, evolving into a
self-describing observability substrate. The foundation is unchanged: .NET 10
NativeAOT-compatible zero-code instrumentation through managed build assets, source generation,
DiagnosticListener consumption, and module-initializer boot. The direction is the North Star
below.

Keep this repository separate from:

  • semantic-convention package generation (Qyl.OpenTelemetry.SemanticConventions is a referenced
    vocabulary package, not generated here),
  • the old CLR-profiler/OpenTelemetry auto-instrumentation substrate,
  • unrelated compile-time tracing experiments (the experiment/ and spike/ trees stay outside
    the .slnx / production build graph — see docs/experiments/).

North Star — declare and prove the whole stack

Every observability tool today is pull-by-observation: a backend learns what a service emits
by receiving samples over time, and never knows whether it has seen the whole surface. qyl has a
capability none of them have — because instrumentation is source-generated interceptors + a static
contract + a referenced semconv registry + (incrementally) DTO inference, the complete set of
telemetry a binary can ever produce is a compile-time-derivable fact, with provenance.

The substrate goal: every qyl binary ships a complete, machine-readable Telemetry Capability
Graph (TCG)
— the full possible OpenTelemetry surface for that exact binary, each capability
tagged compile-time-owned vs runtime-valued — and proves it by self-hosting (instrumenting its
own pipeline with its own mechanism, zero extra code). Any external entity consumes the TCG to know
the entire stack before a span is sampled. The contract becomes the shared semantic graph; an OTLP
backend is just one consumer.

Three pillars:

  1. Self-host (the proof). qyl instruments qyl with qyl — `QylSelfTelemetr...

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs
  • tools/verify-tcg-publishing-demo.py
  • demos/Qyl.RealTcgPublishingDemo/Program.cs

⚙️ CodeRabbit configuration file

**: Operating principles (solo-dev, agentic SDLC — reviews are advisory, agents act on them):

  1. LAZY: one self-contained, correct review beats ten partial ones. Every finding is
    definitive — concrete evidence with file:line, a concrete fix, no "consider maybe",
    no open or ambiguous questions back to the author. If you cannot decide a point
    from the diff plus repo context, stay silent on it. Never cite a source, API, or
    version you have not verified; an unverifiable claim is a dropped claim.
  2. IMPATIENT: never stall a PR. There are no compatibility obligations here — internal
    and dogfooding code has NO public-API contract; removing shims, breaking signatures,
    and deleting dead paths are normal, desirable changes. Do not flag backward
    compatibility, deprecation ceremony, or migration paths. (SemVer applies only to
    commercially sold libraries — this repo has none.)
  3. EGO: hold the bar of the best reviewer on the market — flag real correctness,
    security, data-loss, and structural problems precisely; produce zero noise.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs
  • tools/verify-tcg-publishing-demo.py
  • demos/Qyl.RealTcgPublishingDemo/Program.cs
src/**/*.cs

⚙️ CodeRabbit configuration file

src/**/*.cs: Zero-code instrumentation runtime: this code runs inside EVERY request of host
applications. Top priorities, in order: (1) allocations and boxing on hot paths —
flag closures, LINQ, params arrays, string concat in listener/semantic-tag code;
(2) tag cardinality — any attribute value that is unbounded (raw URLs, user input,
exception messages) explodes at scale; (3) Activity/Meter lifecycle — undisposed
listeners, leaked subscriptions, double-Start/Stop; (4) thread safety of shared
listener state. PublicAPI.Shipped/Unshipped.txt are analyzer-managed: edits must
come from the analyzer flow, and API breaks are fine (internal product, no
compatibility contract).

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:42:17.153Z
Learning: Keep this repository separate from semantic-convention package generation, the old CLR-profiler/OpenTelemetry auto-instrumentation substrate, and the `experiment/` / `spike/` trees, which stay outside the production `.slnx` build graph.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:42:17.153Z
Learning: Do not overstate the project status: document current-tree behavior only, and clearly distinguish what is shipped from what is next.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:42:17.153Z
Learning: Use the clean-slate workflow before implementation work: check worktree/branch/staged/stash/status state, work from `main` unless told otherwise, and return the tree clean.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:42:17.153Z
Learning: Build the whole repository with `dotnet build Qyl.OpenTelemetry.AutoInstrumentation.slnx`, and treat warnings as errors as the validation floor.
🪛 ast-grep (0.44.0)
tools/verify-tcg-publishing-demo.py

[error] 19-27: Command coming from incoming request
Context: subprocess.run(
["dotnet", "run", "--project", str(PROJECT), "-c", "Release", "-v", "quiet"],
cwd=ROOT,
env=env,
capture_output=True,
text=True,
check=False,
timeout=600,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)

🔇 Additional comments (3)
src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs (1)

47-48: LGTM!

demos/Qyl.RealTcgPublishingDemo/Program.cs (1)

87-92: LGTM!

tools/verify-tcg-publishing-demo.py (1)

19-33: LGTM!


📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added an opt-in publishing extension that emits the Telemetry Capability Graph once at host startup using OpenTelemetry-compatible logging.
    • Added a runnable demo that validates the emitted event payload.
  • Documentation
    • Updated telemetry capability graph documentation (and related guidance) to mark runtime startup log publication as shipped and clarify remaining planned publication channels.
  • Chores / Tests
    • Added an automated script to verify the demo’s output markers and payload consistency.

Walkthrough

Adds a publishing package that emits the telemetry capability graph as an OpenTelemetry LogRecord at host startup, plus a demo and script that verify the emitted record. Docs, solution wiring, and package metadata are updated to match.

Changes

TCG runtime publishing

Layer / File(s) Summary
Docs and status updates
AGENTS.md, docs/TELEMETRY_CAPABILITY_GRAPH.md
Runtime TCG publication is marked shipped, remaining channels are updated, and package-boundary guidance names the publishing package and ILogger-based LogRecord exchange.
Publishing package and API
Directory.Packages.props, src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/...
Adds the publishing project, public extension entrypoint, hosted-service implementation, nullable public API tracking, and the hosting abstractions package version.
Demo host and log assertion
Qyl.OpenTelemetry.AutoInstrumentation.slnx, demos/Qyl.RealTcgPublishingDemo/...
Adds the demo project to the solution, configures OpenTelemetry logging, triggers startup publication, and validates the captured LogRecord contents against QylTelemetryCapabilityGraph.
Verification script
tools/verify-tcg-publishing-demo.py
Runs the demo in Release mode and checks stdout for the expected success markers.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: publishing the TCG as an OpenTelemetry LogRecord.
Description check ✅ Passed The description is clearly related to the implemented TCG publishing package, demo, and verification changes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/tcg-logrecord-publishing
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/tcg-logrecord-publishing

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@demos/Qyl.RealTcgPublishingDemo/Program.cs`:
- Around line 82-87: The Attribute helper in Program.cs is converting attribute
values with parameterless ToString(), which can vary by current culture. Update
the string conversion inside Attribute(LogRecord record, string key) to use
invariant formatting so values like qyl.tcg.capability_count are compared
consistently across cultures.

In
`@src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs`:
- Around line 45-63: Honor the startup cancellation token in
QylTelemetryCapabilityGraphPublishing.StartAsync before logging the
qyl.telemetry_capability_graph event. Add an early cancellation check at the
start of StartAsync and return a canceled Task when the provided
CancellationToken is already canceled, so the _logger.Log call only runs for a
host that is actually starting.

In `@tools/verify-tcg-publishing-demo.py`:
- Around line 19-26: Bound the subprocess call in the verifier so `dotnet run`
cannot hang indefinitely: update the `subprocess.run` invocation in
`verify_tcg_publishing_demo.py` to use a timeout, and handle
`subprocess.TimeoutExpired` by failing the verification while surfacing any
captured stdout and stderr. Keep the behavior localized to the `completed =
subprocess.run(...)` block and make sure the timeout failure path reports enough
output to diagnose a stalled demo run.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 29bf3016-15c1-4f0a-a3d2-8b5ce52c5c57

📥 Commits

Reviewing files that changed from the base of the PR and between 8fb7b58 and 8541d64.

📒 Files selected for processing (11)
  • AGENTS.md
  • Directory.Packages.props
  • Qyl.OpenTelemetry.AutoInstrumentation.slnx
  • demos/Qyl.RealTcgPublishingDemo/Program.cs
  • demos/Qyl.RealTcgPublishingDemo/Qyl.RealTcgPublishingDemo.csproj
  • docs/TELEMETRY_CAPABILITY_GRAPH.md
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/PublicAPI.Shipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/PublicAPI.Unshipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/Qyl.OpenTelemetry.AutoInstrumentation.Publishing.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs
  • tools/verify-tcg-publishing-demo.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (6)
**

⚙️ CodeRabbit configuration file

AGENTS.md

**: # Coverage ledger

This ledger tracks current AOT auto-instrumentation coverage. It is not a scorecard and not a
history diary. Use it to decide what is implemented, what is verified, and what is intentionally
outside this substrate.

Architecture contract

Current substrate:

  • .NET 10 managed runtime libraries,
  • Roslyn source generators,
  • source-visible [InterceptsLocation] interceptors,
  • DiagnosticListener and Activity payload consumption,
  • build/buildTransitive package assets,
  • [ModuleInitializer] bootstrap.

Forbidden product mechanisms:

  • CLR profiler attach,
  • startup hooks,
  • runtime IL rewriting or ReJIT,
  • dynamic plugin loading,
  • reflection-based instrumentation dispatch.

Contract classification

Source of truth:

  • docs/contracts/otel-dotnet-auto-60.upstream.yaml plus docs/contracts/qyl-aot-ownership.yaml

Generated outputs:

  • docs/generated/qyl-aot-contract.resolved.yaml
  • docs/generated/qyl-aot-contract.schema.json
  • src/Qyl.OpenTelemetry.AutoInstrumentation.SourceGenerators/InstrumentationContract.cs
  • docs/coverage-matrix.md

Current classification:

Slice Count Binding
Total contract items 60 InstrumentationContract.TotalCount
Implemented signal promises 33 Implemented by a declared qyl lane; source-interceptor coverage is tracked separately in the generated matrix.
Unsupported NativeAOT parity/dynamic signal promises 4 Classic ASP.NET/WCF/dynamic parity items retained with explicit unsupported status.
Global environment controls 7 Read by QylAutoInstrumentationOptions.
Instrumentation options 16 Read by QylAutoInstrumentationOptions; raw query/statement values remain behind upstream opt-in flags.

Verified behavior

Area Evidence
Package layout tools/verify-package-layout.py validates analyzer/build/buildTransitive assets and forbids profiler/reflection tokens in package assets.
ProjectReference dogfo...

Files:

  • Directory.Packages.props
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/PublicAPI.Shipped.txt
  • Qyl.OpenTelemetry.AutoInstrumentation.slnx
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/PublicAPI.Unshipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/Qyl.OpenTelemetry.AutoInstrumentation.Publishing.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs
  • demos/Qyl.RealTcgPublishingDemo/Qyl.RealTcgPublishingDemo.csproj
  • tools/verify-tcg-publishing-demo.py
  • demos/Qyl.RealTcgPublishingDemo/Program.cs
  • docs/TELEMETRY_CAPABILITY_GRAPH.md
  • AGENTS.md

⚙️ CodeRabbit configuration file

**: Operating principles (solo-dev, agentic SDLC — reviews are advisory, agents act on them):

  1. LAZY: one self-contained, correct review beats ten partial ones. Every finding is
    definitive — concrete evidence with file:line, a concrete fix, no "consider maybe",
    no open or ambiguous questions back to the author. If you cannot decide a point
    from the diff plus repo context, stay silent on it. Never cite a source, API, or
    version you have not verified; an unverifiable claim is a dropped claim.
  2. IMPATIENT: never stall a PR. There are no compatibility obligations here — internal
    and dogfooding code has NO public-API contract; removing shims, breaking signatures,
    and deleting dead paths are normal, desirable changes. Do not flag backward
    compatibility, deprecation ceremony, or migration paths. (SemVer applies only to
    commercially sold libraries — this repo has none.)
  3. EGO: hold the bar of the best reviewer on the market — flag real correctness,
    security, data-loss, and structural problems precisely; produce zero noise.

Files:

  • Directory.Packages.props
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/PublicAPI.Shipped.txt
  • Qyl.OpenTelemetry.AutoInstrumentation.slnx
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/PublicAPI.Unshipped.txt
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/Qyl.OpenTelemetry.AutoInstrumentation.Publishing.csproj
  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs
  • demos/Qyl.RealTcgPublishingDemo/Qyl.RealTcgPublishingDemo.csproj
  • tools/verify-tcg-publishing-demo.py
  • demos/Qyl.RealTcgPublishingDemo/Program.cs
  • docs/TELEMETRY_CAPABILITY_GRAPH.md
  • AGENTS.md
**/*.csproj

📄 CodeRabbit inference engine (AGENTS.md)

Do not hand-maintain <Version> or <PackageVersion> in project files; the package version is CI-owned and derived from the latest v* tag.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/Qyl.OpenTelemetry.AutoInstrumentation.Publishing.csproj
  • demos/Qyl.RealTcgPublishingDemo/Qyl.RealTcgPublishingDemo.csproj
**/*.cs

📄 CodeRabbit inference engine (AGENTS.md)

Use stable OpenTelemetry attributes with bounded values: prefer route templates over raw paths, avoid raw text in span names, redact query-string values by default, gate db.query.text behind the upstream flags, and keep QYL_CONFORMANCE_ENABLED=1 as the conformance switch.

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs
  • demos/Qyl.RealTcgPublishingDemo/Program.cs
src/**/*.cs

⚙️ CodeRabbit configuration file

src/**/*.cs: Zero-code instrumentation runtime: this code runs inside EVERY request of host
applications. Top priorities, in order: (1) allocations and boxing on hot paths —
flag closures, LINQ, params arrays, string concat in listener/semantic-tag code;
(2) tag cardinality — any attribute value that is unbounded (raw URLs, user input,
exception messages) explodes at scale; (3) Activity/Meter lifecycle — undisposed
listeners, leaked subscriptions, double-Start/Stop; (4) thread safety of shared
listener state. PublicAPI.Shipped/Unshipped.txt are analyzer-managed: edits must
come from the analyzer flow, and API breaks are fine (internal product, no
compatibility contract).

Files:

  • src/Qyl.OpenTelemetry.AutoInstrumentation.Publishing/QylTelemetryCapabilityGraphPublishing.cs
AGENTS.md

📄 CodeRabbit inference engine (CLAUDE.md)

AGENTS.md: Document agent implementations with clear descriptions of purpose, inputs, outputs, and examples in AGENTS.md
Include structured metadata (purpose, inputs, outputs, examples) for each agent implementation
Provide executable examples for each agent to demonstrate usage

Files:

  • AGENTS.md
{CLAUDE.md,AGENTS.md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep CLAUDE.md as a symlink to this file, and edit AGENTS.md only.

Files:

  • AGENTS.md
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:30:00.151Z
Learning: Keep this repository separate from semantic-convention package generation, the old CLR-profiler/OpenTelemetry auto-instrumentation substrate, and unrelated compile-time tracing experiments in the `experiment/` and `spike/` trees.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:30:00.151Z
Learning: Do not reintroduce legacy substrate mechanisms into product code or package assets: CLR profiler attach, startup hooks, runtime IL rewriting, ReJIT, `AssemblyLoadContext` plugin loading, `qyl install` deployment flows, `gate.sh` attach flows, or reflection-based instrumentation dispatch.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:30:00.151Z
Learning: Runtime `DiagnosticListener` lanes must remain; missing values stay missing and must never be synthesized.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:30:00.151Z
Learning: Build the Telemetry Capability Graph and self-host telemetry only from the accepted mechanisms in this repo: ordinary compiled C#, source-generated interceptors, build-transitive assets, module-initializer activation, BCL telemetry primitives, and public diagnostic payloads.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:30:00.151Z
Learning: Keep EFCore code isolated in `Qyl.OpenTelemetry.AutoInstrumentation.EntityFrameworkCore`, SqlClient code isolated in `Qyl.OpenTelemetry.AutoInstrumentation.SqlClient`, hosting/bootstrap code isolated in `Qyl.OpenTelemetry.AutoInstrumentation.Hosting`, and shared runtime helpers in `Qyl.OpenTelemetry.AutoInstrumentation`.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:30:00.151Z
Learning: Keep README user-facing and operational, keep CHANGELOG synthetic and useful for continuation, and describe current-tree behavior rather than old PR state or ceremonial progress claims.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:30:00.151Z
Learning: Use the narrowest verifier that covers the changed surface, and route validation through the prescribed Python, `dotnet build`, or smoke-test commands for that surface.
Learnt from: CR
Repo: ANcpLua/Qyl.OpenTelemetry.AutoInstrumentation

Timestamp: 2026-06-29T09:30:00.151Z
Learning: For file changes, commit and push the intended scope, and avoid accidental remote history rewrites.
🪛 ast-grep (0.44.0)
tools/verify-tcg-publishing-demo.py

[error] 18-25: Command coming from incoming request
Context: subprocess.run(
["dotnet", "run", "--project", str(PROJECT), "-c", "Release", "-v", "quiet"],
cwd=ROOT,
env=env,
capture_output=True,
text=True,
check=False,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(subprocess-from-request)

🔇 Additional comments (4)
docs/TELEMETRY_CAPABILITY_GRAPH.md (2)

3-5: LGTM!


84-93: LGTM!

AGENTS.md (2)

46-55: LGTM!


159-160: LGTM!

Comment thread demos/Qyl.RealTcgPublishingDemo/Program.cs Outdated
Comment thread tools/verify-tcg-publishing-demo.py Outdated
… invariant attribute formatting

Address CodeRabbit review on #14:
- verify-tcg-publishing-demo.py: bound `dotnet run` with timeout=600 and fail on
  TimeoutExpired with captured output — a hung run-once demo must fail fast rather
  than pin the shared self-hosted runner.
- TelemetryCapabilityGraphPublisher.StartAsync: return Task.FromCanceled when the
  startup token is already canceled (IHostedService convention; internal-only, no
  public API change).
- RealTcgPublishingDemo Attribute(): format attribute values with
  CultureInfo.InvariantCulture so values compared as strings are culture-stable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ANcpLua
ANcpLua merged commit a9b6fea into main Jun 29, 2026
9 checks passed
@ANcpLua
ANcpLua deleted the feat/tcg-logrecord-publishing branch June 29, 2026 09:46
ANcpLua added a commit that referenced this pull request Jul 6, 2026
…#37)

verify-tcg-publishing-demo.py shipped with First-Light step 3 (#14) and is
referenced by docs/TELEMETRY_CAPABILITY_GRAPH.md, but was never registered in
the goal orchestrator's COMMANDS — a verifier that never ran anywhere.

Registered as 'tcg publishing demo' next to 'webapi aot demo' (same class:
container-free demo verifier, so it runs in the PR-time validation floor, not
only post-merge).

Verified: --only "tcg publishing demo" → tcg-publishing-demo-ok.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant