Repository navigation
Description
User Story
As a security or compliance reviewer investigating a policy violation, I want each OCSF event to carry the ID of the trace that produced it, so that I can jump from the event in my log aggregator straight to the supervisor's trace instead of matching sandbox IDs and timestamps by hand.
Status
#4789 and #5214 delivered the HTTP part:
- HTTP Activity and API Activity records emitted inside a sampled span carry
trace.uidand listtraceinmetadata.profiles. OCSF 1.8.0 declares the Trace profile only for these two classes. - Inspected HTTP requests get a request span that records every outcome, and their audit records are correlated with it at emission (feat(observability): correlate HTTP receipts, OCSF and request traces #5214). Non-inspected HTTP denials get a rate-limited INFO
supervisor.egress.denyspan (feat(ocsf): correlate audit events with sampled OpenTelemetry traces #4789). Audit records are emitted either way. - OTLP log export links every OCSF record, whatever its class, to the active sampled span through the log record's trace and span ID fields.
- Downgrades to OCSF 1.3 and 1.1 drop the
traceobject and profile.
What remains is the connection level, described below.
Problem Statement
Network Activity records (L4 policy denials, mapping and SSRF denials, DNS refusals) still have nothing to link to at the default log level. The supervisor's per-connection span, supervisor.egress.connect with its authorize, resolve and dial children, is DEBUG, so no span is active when these records are emitted, and their OTLP log records carry no trace or span ID.
Impact / Why This Matters
A reviewer who finds an L4 or DNS deny in the log aggregator still has to search the trace backend by sandbox ID and time window. That breaks down on a busy sandbox, and SIEM pipelines have no join key to automate it. Connection failures that are not denies, such as a DNS error, are equally invisible in traces at the default level.
Proposed Design
Trace each egress connection at the default log level with one span per connection that records its outcome, the same way #5214 does for inspected HTTP requests. No span exists only because a denial happened.
- The connection span (
supervisor.egress.connect, withauthorize,resolveanddialwhere those stages run) records whether the connection was allowed, refused by policy or safety checks (L4 policy, mapping, SSRF), or failed operationally. An operational DNS failure is an error onresolve. Ordinary transport I/O errors keep their operational classification. - Network Activity records emitted for a connection are emitted inside its span, so their OTLP log records carry its trace and span ID. Network Activity records do not get a
traceobject, since OCSF 1.8.0 does not declare the Trace profile for that class. - Nothing depends on spans being exported. Audit records, enforcement, and correlation behave the same whether a connection's span is sampled or not, and when tracing is disabled, rate limited, or unable to export.
- Supervisor sampling (feat(observability): operator-controlled sampling for supervisor spans #5362) does not block this work. Once it lands, connection spans are sampled like any other supervisor span: traces are for latency and errors, and OCSF stays the complete record of every denial.
Scope
- Dedicated supervisors first. Shared-supervisor OTLP export is tracked in feat(observability): export shared-supervisor traces and OCSF logs via OTLP #5505.
- The connection span shares the CONNECT, proxy, and telemetry paths with the request correlation from feat(observability): correlate HTTP receipts, OCSF and request traces #5214, which is now on main.
- Out of scope: linking a deny to the agent's own trace through the workload's
traceparentheader. The workload controls that header, so it belongs in a separate, clearly labelled field and never in thetraceobject.
Acceptance Criteria
- OCSF HTTP Activity and API Activity events emitted inside a sampled OTel span include
trace.uid(32 lowercase hex characters) and listtraceinmetadata.profiles(feat(ocsf): correlate audit events with sampled OpenTelemetry traces #4789). - Events emitted without an active sampled span omit the
traceobject and do not list the profile (feat(ocsf): correlate audit events with sampled OpenTelemetry traces #4789). - Events downgraded to OCSF 1.3 or 1.1 have no top-level
traceobject and notraceinmetadata.profiles(feat(ocsf): correlate audit events with sampled OpenTelemetry traces #4789). -
openshell-ocsfhas no OpenTelemetry dependency (feat(ocsf): correlate audit events with sampled OpenTelemetry traces #4789). - At the default supervisor log level, OCSF HTTP deny events emitted inside a sampled span carry a
trace.uid, and the OTLP log records of network deny events emitted inside a sampled span carry a trace ID and span ID. Each identifies the trace the supervisor exported. - At the default log level, an egress connection on a dedicated supervisor produces a connection span that records its outcome: allowed, refused by policy or safety checks (with the cause), or failed (a DNS failure as an error on
resolve). - OCSF records and enforcement are unchanged when tracing is disabled, the span is unsampled or rate limited, or the collector is unreachable.
- The published observability docs describe how to follow a Network Activity record to its trace.
Alternatives Considered
Deny-only spans for L4 and DNS refusals (the original proposal for this part): gives every network deny a trace at a low span volume, but a span would exist only because something was denied. Allowed connections and operational failures stay invisible, and each kind of refusal needs its own span site. A connection span that records its outcome covers all of them in one place, and matches how #5214 traces inspected HTTP requests.
A trace object on Network Activity records: outside OCSF 1.8.0, which declares the Trace profile only for HTTP Activity and API Activity. The OTLP log record's trace and span ID fields are the standard link for other classes.
Top-level trace_id / span_id fields or the unmapped mechanism: rejected earlier for HTTP as well. The first is outside the schema, and unmapped is meant for source data that has no OCSF attribute.
Related
#1055 (Enterprise Observability), #2508 (Supervisor OTel span emission), #3977 (supervisor OTLP span export), #4789 (HTTP and API trace correlation), #5214 (HTTP request correlation), #5362 (supervisor sampling), #5505 (shared-supervisor OTLP export), #5210 (agent traces and enforcement), #3196 (OTLP relay)
Activity
kvnloo commentedon Sep 27, 2026
I checked this against the current crate boundary and the vendored OCSF schema.
One wrinkle: the OCSF 1.8 base schema does not define top-level
trace_id/span_idfields for these events. It does provide the schema-boundedunmappedescape hatch.There is also a dependency-boundary question:
openshell-ocsfcurrently owns OCSF event construction and depends ontracing;openshell-otelalready owns OpenTelemetry context extraction throughtracing_opentelemetry::OpenTelemetrySpanExt.I would prefer not to make the OCSF crate itself responsible for discovering the active OpenTelemetry context.
A narrow design could be:
That keeps OCSF serialization independent of the OpenTelemetry implementation.
If top-level
trace_id/span_idfields are intended as an OpenShell-specific extension instead, I think that should be explicit in the contract because it is outside the vendored base schema.Which representation do you prefer?
rhuss commentedon Oct 4, 2026
Thanks for checking this against the schema, @kvnloo. You're right on both counts. The dependency point also exposes a bug in my original proposal:
tracing::Span::current()only gives you process-local tracing IDs, not W3C trace and span IDs.Representation. I'd go with neither top-level fields nor
unmapped. OCSF 1.8 defines a Trace profile for this case, with atraceobject that holds the W3C trace ID intrace.uid. We only vendor theai_operationprofile today, so it's easy to miss. An event would look like this:{ "metadata": { "profiles": ["security_control", "network_proxy", "container", "host", "trace"] }, "trace": { "uid": "0af7651916cd43dd8448eb211c80319c" } }One catch: the 1.8
spanobject requiresstart_timeandend_time, and we emit the OCSF event while the span is still open. So I'd shiptrace.uidfirst, since that's what a security reviewer pastes into Tempo or Jaeger anyway, and settletrace.spanin the PR against the vendored-schema validation tests.Layering. Agreed,
openshell-ocsfshouldn't know about OpenTelemetry. What I have in mind:openshell-ocsfgets a plain-data correlation type and a builder setter that renders thetraceobject and adds the profile.openshell-otelextracts the active context and returns it only when the span context is valid and sampled. An unsampled trace ID sends the reviewer to an empty search result, which is worse than no ID.openshell-ocsfat startup, andocsf_emit!fills in the context when the builder hasn't set one. The emitting crates don't each need an OTel dependency, and an explicit setter still wins where the current span is the wrong source.Prerequisite. I also got something wrong in the issue: on main, the supervisor crates have no OpenTelemetry instrumentation yet. #3977 adds it, so this should build on that PR. Even with #3977 there are two gaps for the network-deny case:
openshell=infoat the defaultwarnlog level, so at default settings a deny would still carry no exported trace ID. I'd lean toward an INFO span around deny decisions only. Denies are rare and they're what a security reviewer investigates, while allowed connections stay at DEBUG to keep the span volume down.traceparentheader (relayed via feat(observability): supervisor OTLP telemetry relay #3196). The workload controls that header, so it needs a separate, clearly labelled field and must not end up in thetraceobject. I'd handle that as a follow-up.I'll update the issue body to reflect this. Are you planning to pick up the implementation? If so, building on top of #3977 makes sense.
HarryMoss commentedon Oct 6, 2026
I checked this against
mainat5601d71b0now that #3977 has landed, and ran a couple of focused tests around the OCSF/OTel path you described.The correlation gap is still present as expected. With an active sampled OpenTelemetry span,
current_trace_context_carrier()gives me a valid W3Ctraceparent, but an OCSFNetworkActivityemitted in that context still serializes without atraceobject /trace.uid.I also noticed two implementation wrinkles / edge cases that may be worth accounting for when this is implemented.
1. OCSF downgrade path
OpenShell emits OCSF 1.8 internally but supports downgrading JSON output to 1.3 and 1.1. The OCSF Trace profile is not present in those older schemas, while the current downgrade code only strips the newer fields/profiles it already knows about (
ai_model,container,ai_operation, etc.).I tried a 1.8 event containing:
{ "metadata": { "profiles": ["security_control", "trace"] }, "trace": { "uid": "0af7651916cd43dd8448eb211c80319c" } }and downgraded it to 1.3. The
traceobject survived the downgrade.So it looks like adding the Trace profile here will also require the downgrade path to strip both the
traceobject and"trace"frommetadata.profilesfor 1.3/1.1, with a regression test alongside the existing downgrade tests.2. Span lifetime around automatic enrichment
In the current egress path the connect span is made current while authorization runs, but some deny OCSF events are emitted afterwards.
I checked the same lifecycle in a focused test:
So if
ocsf_emit!obtains correlation only from the current active context, the new INFO level deny span needs to remain current through the actual OCSF emission.Wrapping only the policy evaluation would still leave the emission hook with no trace context. The other option would be to capture the correlation while the span is active and carry it explicitly to the event.
A narrow way to implement and test this seems to be:
traceand the Trace profile are removed for OCSF 1.3/1.1;trace.uidthat resolves to the exported supervisor trace.Does that match the intended implementation boundary for the deny span and the older schema downgrade path?
rhuss commentedon Oct 7, 2026
Thanks @HarryMoss, both points check out and they sharpen the plan.
Downgrade. Confirmed: the Trace profile and the
traceobject first appear in OCSF 1.4, andocsf_schema_versiononly accepts1.1and1.3as downgrade targets. So the existing<= 1.3branch informat/downgrade.rsis the right place: strip thetraceobject and thetraceprofile there, with a regression test next to the existing ones.Deny span lifetime. Also confirmed, on all the L4 egress paths: authorization runs inside
in_scope(...)and the deny events are emitted after it returns. There's a second reason the span can't wrap only authorization: the decision isn't known until authorization finishes, so a span that exists only for denies has to be opened in the deny branch anyway. The plan is a small helper that every deny site enters around its OCSF emission, carrying the decision attributes (policy, reason, destination). That includes the L7 deny sites in the relay and middleware. The automatic hook then picks up the context without call-site changes, and the explicit setter stays available for emissions outside such a span.One consequence worth stating: at the default log level the DEBUG connect span is disabled, so the deny span has no exported parent and becomes a one-span trace of its own.
trace.uidstill resolves and the span carries the decision attributes, but the full connect, authorize, resolve and dial tree only shows up at debug level. I think that's the right trade-off for span volume. The acceptance test should check exactly that: at the default level, a deny event'strace.uidresolves to an exported trace containing the deny span.So yes, your four steps match the boundary I have in mind. I'll fold both points into the issue body.
On implementation: I have nothing in progress on this. If you'd like to take it on, @HarryMoss (or @kvnloo, since you looked at it first), go ahead. I'm happy to collaborate, answer design questions as they come up, and review the PR. If neither of you wants to pick it up, just let me know and I'll start on it myself.
HarryMoss commentedon Oct 7, 2026
Thanks @rhuss, I’m happy to take it on and I’ll start looking at it tonight and tomorrow.
@kvnloo, if you’ve already started implementation please let me know, I’m happy to leave it with you rather than duplicate.
kvnloo commentedon Oct 7, 2026
Thanks @HarryMoss, please go ahead and take the lead! I’d started an implementation, but it never got pushed and that workspace is currently inaccessible, so I don’t have a usable branch to hand over. No need to wait on me. Happy to help review/test your PR. Thanks for catching the downgrade and span-lifetime cases, and @rhuss for clarifying the implementation boundary.
HarryMoss commentedon Oct 7, 2026
Thanks @kvnloo, really appreciate that. I’d definitely welcome your review and testing, and if you have any thoughts on the approach below I’d be keen to hear them too.
@rhuss, I’ve got a local implementation of #2640 ready and I’m doing the final code review before committing. It covers:
trace.uidcorrelation, explicit builder overrides, and automatic enrichment without adding OpenTelemetry dependencies toopenshell-ocsf;The focused regressions and affected crate suites pass, including the loopback OTLP tests. Linux ARM64 compilation also passes, I haven’t run a deployed sandbox E2E.
I also noticed #4288 now overlaps the downgrade path and several builder and schema changes. I’m keeping those broader fixes separate from #2640.
I’d be interested in both your thoughts on the implementation. @rhuss, from a merge order point of view, would you prefer I wait for #4288 to land and then rebase and adapt #2640, or prepare #2640 for review in parallel?
rhuss commentedon Oct 8, 2026
@HarryMoss great, thanks for moving so fast, and thanks @kvnloo for handing it over.
On merge order, I'd prepare #2640 for review in parallel rather than wait. #4288 is a much larger change and still in review. The overlap with #2640 is small and mechanical, mainly
format/downgrade.rs, which #4288 rewrites, so whichever lands second rebases. The final order is the maintainers' call, of course. cc @zanetworkerThree things should make the parallel path smooth:
trace, so the object moves tounmapped.downgraded_attributesand thetraceprofile is dropped automatically. If fix(ocsf): emit schema-conformant OCSF 1.8 events #4288 lands first, that commit simply goes away.trace.uidthen survives a downgrade underunmapped, which is arguably better for correlation in older SIEMs and still meets the acceptance criterion. So please have the downgrade tests assert "no top-leveltrace, notraceprofile" rather than "no trace ID anywhere".http_activity.jsonalready has the profile'straceattribute, butnetwork_activity.jsonandbase_event.jsondon't, and thetraceandspanobjects aren't vendored at all. Today's validator only checks top-level non-profile attributes, so it won't notice. fix(ocsf): emit schema-conformant OCSF 1.8 events #4288's validator rejects undefined attributes, so a Network Activity event withtracewould fail there. Running your events through fix(ocsf): emit schema-conformant OCSF 1.8 events #4288's validator once, for example by cherry-picking onto its branch locally, would catch this early. But I guess this also work just when rebasing later on, so probably not that urgent.trace.uidresolves in Tempo, on top of reviewing the code.HarryMoss commentedon Oct 8, 2026
Thanks @rhuss, that sounds good. #2640 is close to being ready for review in parallel, and I’ll keep the downgrade change in its own commit.
I’ve updated the vendored Trace schema coverage and checked fixtures from all nine builders, with and without trace correlation, against #4288’s validator in a separate local checkout. The downgrade tests check that successfully converted 1.1 and 1.3 events have no top-level
traceor Trace profile, without requiring the trace ID to disappear fromunmapped.I’m finishing the rebase and final review before pushing the branch. Once it’s up, I’ll share the branch link and exact commit for your Podman and Tempo check. Thanks for offering to run that, and @kvnloo for offering to review and test.
One production question for later is how we interpret a
trace.uidthat doesn’t resolve in Tempo. A failed lookup alone doesn’t tell us whether the trace is delayed, has been lost, or cannot currently be queried. I’ve added a brief note to the documentation in my local #2640 changes that correlation does not guarantee successful export or retention.Would it be useful to capture that as a separate investigation, particularly around supervisor restarts and collector backpressure? I’d keep it outside #2640 and wouldn’t add requirements to the deployed check you’ve offered.
cc @zanetworker
kvnloo commentedon Oct 8, 2026
Thanks @HarryMoss! The parallel review approach looks good, and validating all nine builders against #4288's stricter schema checks was a great catch.
I agree with keeping the downgrade change isolated and preserving trace correlation under "unmapped" where applicable.
Once your branch is pushed, I'm happy to review the sampled-context extraction, explicit overrides, and L4/L7 deny-span lifecycle.
On unresolved Tempo lookups, I think a separate investigation makes sense. We should distinguish delayed ingestion, dropped exports during supervisor restarts or collector backpressure, and retention/query failures. That shouldn't block #2640.
Thanks again for driving the implementation, and @rhuss for clarifying the merge and validation strategy!
1 remaining item
kvnloo commentedon Oct 10, 2026
Thanks @HarryMoss — reviewed
3fae097a5d4355eeff77746f3ea90e89228455e3on Linux x86_64 / Rust 1.95.0. No blocking finding in this bounded review. The head remains unchanged.Executed on your exact branch:
cargo +1.95.0 test --locked -p openshell-ocsf -p openshell-otel: 220 passed, two doc examples ignored. Covers sampled/unsampled/invalid context, explicit overrides, automatic/routed enrichment, all nine builders, and both downgrade contracts.cargo +1.95.0 test --locked -p openshell-supervisor-network --lib deny -- --test-threads=2: 59 passed, including all eight new correlation checks. Real emission helpers and the loopback OTLP receiver confirm default-level L4/L7 deny correlation and allowed/operational controls.telemetry.rs:63–86keeps the INFO span current through actual synchronous OCSF dispatch.Two integration boundaries to retain:
proxy.rs:3026drops the connect span before L7 relay. Later L7 denies can therefore be separate roots even at DEBUG. Your docs already qualify the live-parent condition; retain that qualification in the PR summary. The DEBUG regression proves staged L4 parenting, not a full CONNECT-to-L7 journey.DowngradeOutcome::Downgraded. Successful 1.1/1.3 output must lack top-leveltraceand its profile, while correlation underunmappedmay remain.KeptNativemust retain the whole 1.8 event, including trace/profile.The separate schema review pinned @zanetworker's #4288 at
78621e8bb1fb9af4c91f9cf8dd5c3ebffc62b963: 3 isolated downgrade checks passed, plus one 54-case matrix using Harry's schema files over #4288's unchanged production functions. Results: 18 native no-ops, 24 successful downgrades, 12 correct kept-native outcomes; every result validates against its declared version. Commands werecargo test --locked -p openshell-ocsf --features test-support --test review_trace_downgrade -- --nocaptureandcargo test --locked -p openshell-ocsf --lib review_schema_overlay -- --nocapture. Pinned receipt, source locations, replay fixtures and logs. This independently confirms your earlier nine-builder check; it is a schema overlay, not a compiled full implementation rebase. Suite counts overlap and should not be summed as unique regressions.Credit to Harry for the implementation, @rhuss for the schema/lifetime design and planned deployed check, and @zanetworker for #4288. These local checks do not establish deployed Collector/Tempo delivery; that validation remains with @rhuss. No competing implementation or PR created.
rhuss commentedon Oct 12, 2026
@HarryMoss @kvnloo Picking up the deployed Collector/Tempo delivery check that was left with me. Gateway and supervisor both built from
3fae097a5, run on Podman against an OTel Collector and Tempo, withocsf_json_enabled=trueand the supervisor at the default log level.A sandbox with a read-only policy for
example.comtriggered four denies. Each OCSF-JSON record carriedtrace.uidand thetraceprofile, and every ID resolved in Tempo to a single rootsupervisor.egress.denyspan fromopenshell-supervisorcarrying the sandbox id:www.wikipedia.orgpolicy_dns_ineligiblewww.wikipedia.org:443transparent_tcp_policy_deniedPOST https://example.com/example_readonlyPOST http://example.com/example_readonlyAllowed connections and the allowed GET carried no
trace, as intended. Withocsf_schema_version=1.3, the same denies came out as 1.3 with notraceobject and no Trace profile. No Tempo delivery issues: every lookup resolved immediately.Two non-blocking observations:
openshell.policy.reason, because the HTTP event leavesstatus_detailempty. The reason ("POST / not permitted by policy") appears only inmessage.Not exercised here: the DEBUG parented trace, and the explicit forward-proxy CONNECT path (the workload had no proxy variables, so all egress took the transparent path).
HarryMoss commentedon Oct 12, 2026
Thanks @rhuss for the deployed Collector/Tempo check, and @kvnloo for the independent review, reproducible evidence and compatibility checks. Thanks also @zanetworker for the related schema-conformance and downgrade work in #4288.
Both reviews cover
3fae097a5d4355eeff77746f3ea90e89228455e3. I’ll acknowledge these contributions and link the reviews in the PR description, keeping the tested revisions and coverage limits explicit. I’ll retain the per-decision trace and conditional DEBUG-parenting expectations, and record the non-blocking L7 reason-field observation without expanding #2640.The PR description is prepared. I’m waiting for approval on my existing vouch request, #4222, before submitting it.
krishicks commentedon Oct 19, 2026
@HarryMoss The vouch request has been approved.
HarryMoss commentedon Nov 7, 2026
@rhuss Following the merge of #4789, I'd like to pick up the remaining L4/TCP and DNS correlation work in #2640.
My proposal is to use the existing OTLP log record's trace and span IDs for Network Activity, retain native HTTP/API Trace coverage, and add bounded default-level decision spans around the agreed network refusals. Companion audit records would share that decision scope, with the current span budgets and audit emission preserved.
Before implementing that, could we confirm three points?
trace.uidacceptance criterion to describe this OTLP log-context approach?I'd coordinate any shared telemetry changes with #5214's author and keep its HTTP request-correlation work separate. Validation would cover collector receipt and a source-bound Linux/backend lookup, with allowed/error paths, sampling, limiter exhaustion and context isolation as controls.
Does that fit the remaining work you want under #2640?
krishicks commentedon Nov 7, 2026
Written by Claude Code, reviewed by @krishicks
@HarryMoss #5214 from @afourniernv is in progress in a nearby area. It correlates inspected HTTP requests with traces and OCSF records, and more layers are queued behind it: middleware, credentials, revisions, MCP and delivery. We want to avoid duplicated work. From what's on those branches today, there isn't any: they don't touch Network Activity, DNS or L4 refusals, and #5214 says L4 and uninspected traffic are out of its scope. Both pieces of work touch the deny-span code in
telemetry.rsandproxy.rs. #5214 makes large changes near the CONNECT and L4 deny sites, so expect to rebase onto it, or base your branch on it from the start.On your questions:
traceto HTTP and API Activity, so two criteria need amending. Proposed wording:trace.uid(32 lowercase hex characters) and listtraceinmetadata.profiles."trace.uid, and the OTLP log records of network deny events carry a trace ID and span ID. Each resolves to an exported trace that records the denial."supervisor.egress.connect, withauthorize,resolveanddialchildren, but only at debug level. feat(observability): correlate HTTP receipts, OCSF and request traces #5214 takes this approach for inspected HTTP, where every request has a span that records its outcome. Could your proposal look at doing the same for connections at the default level, so that a DNS failure becomes an error onresolve? That means weighing per-connection span volume against more deny-only spans.HarryMoss commentedon Nov 8, 2026
Thanks @krishicks, that makes sense. I'll revise the proposal around the connection attempt and its outcome, with authorize/resolve/dial stages where they actually run, rather than adding a separate span for each kind of refusal.
I'd suggest:
For volume, my preference is to agree the selection/budget behavior with #5362 before enabling connection spans at the default level. Applying it to a connection trace as a unit should give a more useful authorize/resolve/dial view than selecting unrelated stage spans. We'd still need to bound the total work and retain the existing deny protections until an agreed replacement is in place. The present deny-span limits aren't automatically a budget for whole connection traces.
Could we settle two points before implementation?
I'll keep unsampled audit correlation aligned with #5214 and flag any need for a separate L4 connection identifier rather than assuming the HTTP request ID already covers it. I'll also prepare the separate shared-supervisor export issue you requested.
Validation would cover allowed connections, policy/safety refusals, DNS/dial errors, companion records, concurrent contexts, sampling and budget exhaustion, collector failure and cancellation. Collector receipt and backend lookup would be checked on the exact revision.
Does that fit the direction you have in mind?
krishicks commentedon Nov 8, 2026
Written by Claude Code, reviewed by @krishicks
@HarryMoss a follow-up to the criteria I proposed above. Supervisor sampling is now tracked in #5362. The direction there is uniform sampling with no preference for denials: traces are for latency and errors, and OCSF is the complete record of each denial. Once #5362 lands, a deny record carries trace context only when its span was sampled, so the proposed criterion should read:
trace.uid, and the OTLP log records of network deny events emitted inside a sampled span carry a trace ID and span ID. Each identifies the trace the supervisor exported."The same applies to the L4 work. A span per connection that records its outcome fits better than more deny-specific spans, and it should be sampled like any other span.
HarryMoss commentedon Nov 9, 2026
Drafted with Codex; reviewed and approved by @HarryMoss.
Thanks @krishicks, understood on uniform sampling and the revised lookup criterion.
I’ve prepared a local L4 connection-startup prototype on top of @afourniernv’s #5214 (
7e8f7aec). It records the connection outcome and keeps audit emission independent of tracing. The affected macOS suite and five focused Linux regressions pass; full Linux and deployed Collector/backend validation are still pending.I’ll coordinate the shared paths with @afourniernv and keep default-level rollout dependent on #5362. Is anyone already taking that sampling work, so we can agree where the two changes meet?
krishicks commentedon Nov 11, 2026
Drafted by 🤖, signed off by @krishicks
@HarryMoss #5362 has no owner yet, and it shouldn't block rolling out connection spans. Two requirements apply whether or not sampling exists:
Your prototype is based on #5214 at
7e8f7aec, and #5214 will change in the shared CONNECT, proxy, and telemetry paths as it addresses the review. You'll need to rebase onto its latest revision. Waiting until #5214 merges before you rebase would save you from resolving the same conflicts more than once.HarryMoss commentedon Nov 22, 2026
Thanks @krishicks. Following your guidance, and the merged work from @afourniernv in #5214 and @shiju-nv in #5243, I've adapted the remaining L4 startup tracing locally.
Thanks also @rhuss for the earlier deployed Collector/Tempo check, and @kvnloo for the independent review and compatibility checks on the original 3fae097 revision.
The new results below cover local tree 840babde, based on d197671. Local Linux ARM64 Kubernetes checks used Collector 0.164.0 and Tempo 3.1.1. A two-hour run followed by an eight-hour low-rate continuation used the same two dedicated supervisors without restarting them: 72,000 timed HTTP requests plus 10 preflight controls. All 100,814 request audit records reached native Collector capture, with no missing records or duplicates under these healthy-export conditions. All 244,929 captured OCSF records passed schema validation; periodic and early/late Tempo queries matched the captured span context and attributes.
The controls distinguished policy refusals from operational failures and covered allowed traffic, companion findings and untrusted incoming trace context. A separate held-open tunnel check retrieved its startup span before the tunnel closed.
These are ARM64 dev images on one Docker Desktop host; release/native AMD64 and multi-host HA remain unqualified. The soak also doesn't establish outage durability. I propose keeping the L4 follow-up separate from shared-supervisor OTLP export in #5505
HarryMoss commentedon Nov 22, 2026
@krishicks, should the remaining L4 startup-tracing follow-up close #2640 under the revised criteria, or would you prefer a separate issue for that PR? Shared-supervisor OTLP export would remain in #5505.