← Back to Blog
Activity

Talk at JAWS-UG Containers: A Rust ECS Service in Application Signals Without Auto-Instrumentation

· 6 min read

OpenTelemetry
Amazon ECS
JAWS-UG

On November 16, 2026, I spoke at JAWS-UG Containers #31. The Japanese title translates to Getting an ECS Service into Application Signals Without Auto-Instrumentation. Amazon CloudWatch Application Signals documents automatic or zero-code instrumentation for seven languages, and Rust is not among them. The talk covered what to deploy instead, and what manual instrumentation leaves for the developer to decide.

About JAWS-UG Containers

JAWS-UG is the volunteer-run AWS user community in Japan, with chapters based on regions and technical interests. The Containers chapter covers container workloads on AWS.

This edition was a casual lightning-talk night, streamed online. Six speakers had fifteen minutes each, and any topic connected to containers was welcome. The other talks covered CI/CD for container applications on Amazon ECS, Amazon ECR lifecycle policies, network policies on Amazon EKS, SOCI indexes for faster container startup, and choosing between EKS, ECS, and Lambda for a developer platform.

What I shared

The running example was a hypothetical catalog-publishing API written in Rust on ECS Fargate. A client calls PublishCatalog over gRPC. The API copies the catalog from a draft area to a public one with Amazon S3 CopyObject, then sends an Amazon SQS message so the search index gets updated. One request makes two external calls, and the total time alone does not say which of the two is slow.

What ECS provides on its own stops short of that answer.

What you want to knowWhere it comes fromWhat is missing
CPU and memory utilizationECS metricsNothing per request
Request count, response time, error countECS Service ConnectOnly traffic that goes through Service Connect
Total time for one requestApplication logsDuration and failures of each external call

Application Signals is the APM feature of Amazon CloudWatch. It organizes an investigation into three levels: Services (here, catalog-api), Operations (PublishCatalog), and Dependencies (S3 CopyObject and SQS SendMessage). Each level comes with Latency, Error, and Fault metrics.

Choosing a setup for Rust

The AWS documentation lists three instrumentation setups.

SetupHow the app is instrumentedDecision
ADOT integrated setupAuto-instrumentation by the ADOT agentSkipped: ADOT does not support Rust
Standard OpenTelemetry setupZero-code or manual instrumentationAdopted: works for languages ADOT does not cover
X-Ray SDK setupInstrumentation with the X-Ray SDKSkipped: in maintenance mode since February 2026

ADOT (AWS Distro for OpenTelemetry) is the OpenTelemetry distribution that AWS tests, ships, and supports. It includes an SDK with auto-instrumentation agents, which produce telemetry without code changes, and the ADOT Collector, which receives telemetry and forwards it to AWS.

As of November 15, 2026, the supported systems page lists ADOT auto-instrumentation for Java, .NET, Python, and Node.js, and zero-code instrumentation with standard OpenTelemetry for PHP, Ruby, and Go. Rust is not in the list of supported languages. It does appear as an example of a language that uses the standard OpenTelemetry setup. So the Rust API calls the standard OpenTelemetry SDK from its own code, which is manual instrumentation.

The task and the path spans take

With ADOT auto-instrumentation, an ECS task has three containers: an init container that supplies the agent, the application, and the CloudWatch agent. The task in this talk has two. The application embeds the OpenTelemetry SDK, and the CloudWatch agent runs next to it as a sidecar.

The SDK records each request as a trace made of spans. For PublishCatalog there are four: one for handling the request, one for internal preparation, and one for each call to S3 and SQS.

CloudWatch Transaction Search stores spans sent to AWS X-Ray in CloudWatch Logs and makes them searchable. Every span is stored in the aws/spans log group, while the share of spans that gets indexed for search is a separate setting with a default of 1%. Application Signals builds its views from the stored spans.

That leaves the question of how a task sends spans to X-Ray.

MethodExtra implementationContainer to operateDecision
Send directly from the application to the X-Ray OTLP endpointOTLP/HTTP export and authenticationNoneSkipped: no request signing in the application
ADOT Collector sidecarNoneCollector, with destination and authentication configuredSkipped: the agent can do the same job
CloudWatch agent sidecarNoneAgent, with one receiver settingAdopted

The resulting path is short. The SDK in the Rust API creates spans and sends them over OTLP/gRPC to the CloudWatch agent in the same task. The agent authenticates to AWS and forwards them to X-Ray. With Transaction Search enabled, the spans land in CloudWatch Logs and Application Signals uses them. The application only produces telemetry; delivery to AWS is the agent's job.

What manual instrumentation leaves to you

Getting spans to Application Signals is half of the work. The metrics are computed from what the spans contain. With auto-instrumentation, the ADOT implementation defines that content. With manual instrumentation, the developer does. The list of things to decide includes span kind, span status, sampling, the service name, span attributes, trace context propagation, and log correlation. The talk went into three of them.

Span kind decides whether dependencies show up. The kind says what role a span plays. The span that handles PublishCatalog is SERVER, the internal preparation is INTERNAL, and the calls to S3 and SQS are CLIENT. Record external calls as CLIENT spans, and check that the spans your libraries create carry the kind you expect. PRODUCER and CONSUMER exist for messaging, but the SQS span here measures an AWS API call, so it is CLIENT.

Span status decides availability. Application Signals counts HTTP 4xx responses as Error, and HTTP 5xx responses and spans with status ERROR as Fault. Availability is (1 − Fault ÷ requests aggregated into the metric) × 100. If a request with invalid input also ends in an ERROR span, availability drops while the server is healthy. The SERVER span should be marked ERROR only for failures on the server side.

Sampling decides whether every request is counted. In the standard OpenTelemetry setup, metrics are aggregated from the spans that arrive, so a request that was not sent is not in the numbers.

SetupCounting every request
ADOT SDK + CloudWatch agentMetrics cover all requests even when traces are sampled down
Standard OpenTelemetry SDK + CollectorRequires 100% sampling

Sending and storing every span costs more, so the sampling rate is a trade-off between how exact the metrics need to be and what they cost.

Takeaways

A Rust API with no auto-instrumentation can still be monitored with Application Signals, using the standard OpenTelemetry SDK and a CloudWatch agent sidecar. Per-operation metrics for the gRPC API and its external dependencies show up in Application Signals. The catch is that the content of the spans has to be decided before the instrumentation is written, working backward from what you want to see on the screen.

View the slides on Speaker Deck.