NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
AWS X-Ray distributed tracing for Dart. Auto-traces dart:io HTTP and Smithy SDK clients, propagates X-Amzn-Trace-Id, and sends segments via UDP. First-class Lambda support.
Last release 2 months ago
14 Jul 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 7 of 7 stable releases
Nothing withdrawn
no release was ever pulled
4 months old
9 releases · first in 2026
One column per month.
Docs and release-tooling release — no library code changes.
Docs and release-tooling release — no library code changes.
trace() API: README and examples now leadtracer.trace() / XRay.trace(); run() is documented for its tworunLambdaInvocation internals).Invoke → aws.function_name capture and full-URL recording.One-call tracing ergonomics: configure once, then trace any unit of work in a single line — plus distributed-trace continuation and Lambda handler pol
One-call tracing ergonomics: configure once, then trace any unit of work in a
single line — plus distributed-trace continuation and Lambda handler
polish. All changes are backward-compatible.
XRayTracer.trace(name, fn) — the one-call entry point: creates thefn inside the trace zone, closes, and sends. AcceptsFutureOr so any function drops in, user: for the segment's user field,httpMethod:/urlPath: for the sampling decision.trace(..., traceHeader:) takes theX-Amzn-Trace-Id header and links this service into the caller'sRoot= becomes the trace id, Parent= the parent id); the localhandleTraced.XRay.trace(...) and XRay.capture(...) — static facades over theXRay.configure() the full trace lifecycleconfigure() runs.XRay.runLambdaInvocation now accepts a FutureOr-returning fn (handler() async => coercion) and an optional tracer:lib/src/context/, the X-Amzn-Trace-Id formatter to lib/src/models/,lib/src/aws/region.dartisAwsHost). No public-API impact.trace()/capture() API, with a rewrittenadvanced_tracing.dart demonstrating captureAsync nesting and a stub-freehandleTraced now records the full request URL (requestedUri) in thehttp.request.url instead of only the path + query, per the X-Rayexample/sampling_strategies.darturlPath into thepackage:http AWS tracing now recognizes the Lambda data-plane Invoke call. XRayBaseClient reads the operation ( Invoke ) and target function from the
package:http AWS tracing now recognizes the Lambda data-plane Invoke call.XRayBaseClient reads the operation (Invoke) and target function from the/2015-03-31/functions/{name}/invocations), recording it asaws.function_name and adding the function to aws.resource_names so theAwsData.functionName, serialized as function_name in the aws block perStable release of the 0.3.0 line. Functionally identical to 0.3.0-beta.2 — no API or behavior changes since the beta — with documentation and example
Stable release of the 0.3.0 line. Functionally identical to 0.3.0-beta.2 —
no API or behavior changes since the beta — with documentation and example
polish. For the full set of changes since 0.2.1, see the 0.3.0-beta.1 and
0.3.0-beta.2 sections below. Headline additions across the line:
XRay.configure() builds a tracer from the AWSXRay.tracer), and patches HTTPXRay.reset() returns to the unconfigured no-op state.package:http tracing. XRay.aws() / XRay.httpClientFor() wrap anhttp.Client for aws_client / aws_*_api SDKs, resolving the global tracerLambdaTraceCapture captures theLambda-Runtime-Trace-Id header per invocation and XRay.runLambdaInvocationInMemorySender for asserting on emitted segments and Lambda packets inXRayTracer.onSampledDrop / onSendError diagnostics.InMemorySender), and the README/AGENT docs wereSecond beta of the 0.3.0 line. This release tightens the beta.1 APIs and fixes trace-fidelity edge cases found during integration testing.
Second beta of the 0.3.0 line. This release tightens the beta.1 APIs and fixes
trace-fidelity edge cases found during integration testing.
InMemorySender, exported from the package barrel, for tests that need toXRay.annotate(Map<String, Object>) and XRay.metadata(key, value) facadeTraceId.parseRootString(header) for log-enrichment callers that only needXRayTracer.onSampledDrop and XRayTracer.onSendError hooks to distinguishXRay.aws() and XRayBaseClient(inner) now resolve the global tracer perXRay.configure() now trace after configuration.isSampled == false outside a traceSampled=1 for traces it will never emit.contextMissingPolicy is mutable on XRayTracer for runtime diagnostics andReservoirSampler now uses a monotonic Stopwatch clock instead of wall time,.amazonaws.com.LambdaTraceCapture stores captured runtime trace headers in a zone-local slotrun(), preventing interleaved invocations from reading each other'srunLambda invocations now skip subsegment serialization and notifyonSampledDrop before any send/encoding work.First beta of the 0.3.0 line. Themes: zero-config setup ergonomics, segment-level HTTP recording for the server middleware, and a packaged Lambda trac
First beta of the 0.3.0 line. Themes: zero-config setup ergonomics, segment-level
HTTP recording for the server middleware, and a packaged Lambda trace-header
capture. Pre-release — published for integration testing.
XRay.configure({fromEnv, serviceName, sampling, tracer, patchDartIoHttp}) builds a tracer from the standard AWS environmentAWS_XRAY_DAEMON_ADDRESS, IPv6-literal safe; AWS_LAMBDA_FUNCTION_NAME),XRay.reset() returns to the unconfigured state.XRay.tracer getter/setter and XRay.isConfigured.XRay.aws({inner}) and an optional-tracer XRay.httpClientFor return apackage:http client (using the global tracer) foraws_client / aws_*_api constructors.XRayBaseClient(inner) now accepts an optional tracer, defaulting to theXRay.runLambdaInvocation(capture, name, fn) runs one Lambda invocation,AWS::Lambda::Function facade when a trace header wasLambdaTraceCapture packages the Lambda-Runtime-Trace-Id capturehttp.runWithClient-based) and exposes a parsed LambdaTraceContexttraceId, parentId, sampled) — no runtime fork needed.XRayTracer.annotateAll(Map) adds many annotations in one call.XRayTracer.currentTraceId convenience getter for the active trace id.Segment.http (with Segment.withHttp); handleTracedSegment.http was removed inhandleTraced reads the sampling decision inside the run zone, so anSampled=0 on the outgoing headerSampled=1).200; the response block is omitted so the faulted segment stands alone.aws_client / aws_*_api recipe, and theLambdaTraceCapture-based Lambda example (replacing a hand-rolled shim).doc/architecture.md: updated for the new facade/tracer API surface.Consolidated the two overlapping HTTP sections in the README into one HTTP tracing section ( dart:io patch, package:http client, response-body lifecyc
HTTP tracing section (dart:io patch, package:http client, response-bodyAOT-safe feature claim and dropped the misleadingFlutter safe label — the package uses dart:io and is not Flutter-webdoc/tracing-behavior.md).First release since 0.1.0 . Contains breaking changes (allowed pre-1.0). Major themes: nested/live tracing, package:http and server-side support, auto…
First release since 0.1.0. Contains breaking changes (allowed pre-1.0).
Major themes: nested/live tracing, package:http and server-side support,
automatic double-trace suppression, a hardened non-faulting transport, annotation
validation, and a dead-code cleanup.
SqlData and Subsegment.withSql (no SQL instrumentation existed).HttpRequestData.userAgent, clientIp, and xForwardedFor (never populated).Cause.workingDirectory (never populated).Segment.service, Segment.http, and Segment.aws (structurally alwaysSegment exposed no way to set them).namespaceForClient and namespaceFor<T>.HttpApiSender was removed — SigV4 signing is not yet implemented; useUdpSender (the default) for all deployments.awsServiceNamespaces map was removed — Smithy clientaws.XRay.registerClient / XRay.fromClient; direct access to clientRegistry,descriptorFor, and ClientDescriptor was an implementation detail.annotate keeps the same signatureSmithyResponseAdapter now returns AWS response metadata. Adapter recordsrequestId, region, and errorCode fields in additionstatusCode and contentLength. This lets XRay.fromClient populateaws.request_id, aws.region, and AWS throttling flags.Nested & live tracing
XRayTracer.captureAsync(name, fn) runs a block as a nested subsegment.Zone, so concurrentXRayTracer.annotate(key, value) / addMetadata(key, value) mutate the entitycaptureAsync subsegment, or the segmentSegment.begin time.TraceContext — the live handle passed to a captureAsync blockannotate / addMetadata / setError / setFault).run / runLambda / captureAsync now marks thepackage:http and server-side tracing
XRayBaseClient wraps a package:http BaseClient, tracing each request withdart:io path.http.request.traced = true when the SDK injectsX-Amzn-Trace-Id, allowing downstream service-to-service linkage in X-Ray.handleTraced(request, tracer, handler) — dart:io HttpServer middlewareX-Amzn-Trace-Id, runs the handler in a trace zone,XRay.untracedHttpClient() builds an HttpClient that is never wrapped bypatchHttp, for calls that should emit no subsegment.Automatic double-trace suppression
XRayBaseClient and XRay.fromClient run their inner send insiderunWithoutDartIoTracing (a zone flag); XRayHttpClient stands down when it ispatchHttp-patcheddart:io client is now traced exactly once.aws orremote) so custom or AWS::... registration values cannot produce invalidAWS trace fidelity
aws.request_id when the response adapteraws.region from the adapter or request URL.ProvisionedThroughputExceededException, ThrottlingException,RequestLimitExceeded, TooManyRequestsException, and SlowDown, not only429.causeTransport & sampling
UdpSender gained an optional onError(Object) callback (silent by default)close(); it resolves + binds once (memoized), uses anXRayTracer gained daemonHost / daemonPort constructor parameters and acontextMissingPolicy (ContextMissingPolicy.ignore / logError /runtimeError) controlling what happens when trace data is recorded with noReservoirSampler accepts an injectable now clock (DateTime Function())Annotation validation (X-Ray best practices)
XRayTracer.annotate, the TraceContext handle, Segment.annotate,Subsegment.annotate) by sanitizing, never throwing: invalid key[A-Za-z0-9_]) become _, and a non-scalar value (notString/bool/int/double) is coerced to its toString(). A malformedSender (or scope-serialization)run / runLambda / closeSegment / close() contain transport errors forSender, not just UdpSender. Fixes a throw in the finalization finallyfn's return value or original exception.UdpSender could fault the traced operation. Removed a per-send DNSlookup + bind, a socket-bind race under concurrency, and unguardedlookup/bind errors escaping into the awaited run().XRayHttpClient double-recorded a subsegment when a response body streamcancelOnError: false). The fault pathdart:io or package:http response body is never consumed, trace finalizationmetadata.xray.incomplete = true and thehandleTraced reported the wrong Sampled= flag. The response header'strue), so itSampled=1; it now reports the real decision.Segment.withFault(err) / Segment.withError(err) record exceptions directlySubsegment supported this).Segment.close() is idempotent — calling it on an already-closed segmentXRayHttpClient preserves the request scheme for host/port overloadsget/post/open use http, not an unconditional https) and closes thedetachSocket() raw-socket upgrades.stderr.writeln logging from runLambda and per-packetdart:developer logging from UdpSender.TraceScope entity tree (internal),Segment / Subsegment documents at scope close;Subsegment.open(...) materializes an accumulated scope.runLambda emits its handler span via the subsegment model (consistentnowSeconds() timing, nested children, fault capture) instead of a hand-built_runZoned in tracer.dart (shared by run/runLambda); reusedencodeSubsegmentDoc in the encoder's oversize-split path; removed theContextMissingPolicydoc/architecture.md).XRayBaseClient.Segment / Subsegment JSON golden test and broad coverage for therunLambda, transport containment, UdpSender robustness,handleTraced, and the resource extractors.XRayTracer with Zone-based context propagation ( run , runLambda )
Initial release.
XRayTracer with Zone-based context propagation (run, runLambda)Segment and Subsegment value objects with annotation and metadata supportTraceId generation and parsing (Root / Parent / Sampled header fields)FixedRateSampler and ReservoirSamplerUdpSender — fire-and-forget UDP to the X-Ray daemon (IPv4 / IPv6, 64 KB split)encodeSubsegmentDoc — encode an independent subsegment document for LambdaNoopSender for tests and local developmentHttpApiSender stub (pending SigV4 signing)XRayHttpClient wraps dart:io HttpClient; auto-traces every requestXRay.patchHttp / XRay.unpatchHttp for global dart:io patchingnamespace='aws' for *.amazonaws.com hostsXRay.registerClient<T> / XRay.fromClient<T> for Smithy-generated clientsResourceExtractor built-ins for DynamoDB, S3, KMS, SQS, and SNSXRayTracer.runLambda emits a subsegment document parented to theAWS::Lambda::Function segment instead of a competingAWS_XRAY_DAEMON_ADDRESS env-var parsing for link-local daemon addressYour coding agent can read these notes before it upgrades. Set up the MCP server →