Feat: Add the lineage demo on the Weather Agent pair - #853
Draft
JoshSag wants to merge 3 commits into
Draft
Conversation
authbridge/lineage-attach: attach the AuthBridge envoy sidecar with the lineage-telemetry plugin (rossoctl#761) to a Deployment that is already running, and nothing else. attach-lineage.sh generates the two objects — a per-app plugin ConfigMap and a strategic-merge patch (proxy-init, envoy-proxy, two config volumes, and opt-in one env var and one image reference on the app's own container) — validating every caller input; sidecar-patch.sh applies them live behind five read-only preconditions, prints the exact rollout undo to return to, and waits; build-otel-shim.sh + Dockerfile.otel-shim + lineage-propagate-hook.py bake a propagate-only OpenTelemetry layer onto an uninstrumented Python app image, activated by LINEAGE_PROPAGATE=1 through a site-packages hook (no command rewrite), refusing images that already instrument and attesting every bake; container-runtime.sh picks podman or docker and kind-loads either way. Lists merge by name, so nothing the owner wrote changes; a patch is one revision. Content capture (capture_io) keeps the plugin's default, off. Follows lineage wire contract v1.6 (parent.source tracestate / wire / none). RECIPE.md is the steps with expected output and back-out; README.md the idea, what the spans carry and the two attach routes (live, or your own kustomization); DESIGN.md why propagation is the app's job, the shim's envelope, the half-instrumented case, and the limits. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MX9Cs16SmYgwU7trMHPfc3 Signed-off-by: YehoshuaSagron <ysagron@gmail.com>
A Reference row beside the other configuration-only entries: the kit attaches per-request lineage to any existing Deployment and deploys no application. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MX9Cs16SmYgwU7trMHPfc3 Signed-off-by: YehoshuaSagron <ysagron@gmail.com>
authbridge/demos/lineage: the weather agent and tool from rossoctl/examples deployed plain (k8s/weather.yaml — two Deployments, two Services, one ConfigMap for the LLM; no AgentRuntime, no platform sidecar, no auth), then given lineage with the attach kit and nothing else. ask.sh sends one A2A turn from inside the cluster with a chosen trace id; show-trace.py reads the collector log and prints the trace's shape with a verdict — it refuses an entry-only trace and counts traces begun by an unparented outbound hop while this one was in flight, so the case that looks fine and is not cannot pass. Measured on kind, host Ollama qwen2.5:7b, sidecar built from rossoctl#761 @ e45bda9 (contract v1.6): capture only, one turn = 35 exchanges, 70 spans, 19 traces (the entry, plus 18 trees of an outbound 'none' hop and the tool's 'tracestate' inbound); after the app's own propagation switch (OTEL_EXPORTER_OTLP_ENDPOINT — the agent ships its instrumentation, and the kit's interlock refuses to bake it for exactly that reason): one trace, 70 sidecar spans + 82 of the apps' own, parent.source 1 wire / 34 tracestate / 0 none, 0 strays. Back-out via the kit's printed lines leaves the namespace as found. The demos index gets the demo row above the kit's; the authbridge README's demo list and the kit's README point at it. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MX9Cs16SmYgwU7trMHPfc3 Signed-off-by: YehoshuaSagron <ysagron@gmail.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
authbridge/demos/lineage/: the Weather Agent pair fromrossoctl/examples, deployed plain, then given per-request lineage with thelineage attach kit and nothing else. Six steps. You see the same turn
twice: 19 separate traces when the app forwards no
traceparent(the entry, plus 18 small trees thesidecar roots for each un-propagated call), then one trace of 70 sidecar spans with one root once the
app's own propagation is switched on. Nothing about the app is edited except one environment variable the
app itself defines. Four files, 542 lines, plus the demo row and one README bullet.
Depends on: #852 (the lineage attach kit) and #761. Stacked on #852: until it merges, this PR's
diff also shows #852's ten files; the demo itself is the last commit, everything under
authbridge/demos/lineage/plus the index row and one README bullet. Draft until #852 lands, thenrebased and marked ready.
What is in the diff
README.mdk8s/weather.yamlAgentRuntime, no platform sidecar, no auth; mirrorsdemos/weather-agent/k8s/*-advanced.yamlminus enrollment, and deliberately leaves the LLM port in the redirectask.shshow-trace.pyWhat it shows
CAPTURE_IO=true, the demo's choice): two commands, both pods2/2.exchanges (the A2A entry, 16 MCP exchanges and their inbound sides, 2 LLM calls), but nothing links a
call to the question that caused it.
OTEL_EXPORTER_OTLP_ENDPOINT→ the collector's OTLP/HTTP port,8335on the stock chart). Why not the kit's shim: the interlock refuses this image, correctly — it already
instruments httpx. The tool needs nothing: its only call that matters is HTTPS, and its own OTLP export
is on the plugin's
bypass_hosts.parent.source1wire/ 34tracestate/ 0none,0 strays, plus 82 of the apps' own spans.
rollout undo --to-revision=1each), both pods1/1;delete the app; the namespace is as found.
Measured 2026-09-03 on kind with the stock platform, host Ollama
qwen2.5:7b, the sidecar built from#761 @
e45bda99(contract v1.6). Every number in the README is from that run.Gates
shellcheck --severity=error: exit 0.ruffat the pre-commit pin andbandit -ll: clean.yamllintwith the CI config andkubectl apply --dry-run=server: clean / accepted fork8s/weather.yaml.show-trace.pyunit-checked on a synthetic log (outbound-noneroot refused,payload-quoted id ignored, midnight-safe sort,
)in values).Assisted-By: Claude (Anthropic AI) noreply@anthropic.com