Check your setup is ready for cost
When you finish setup, you want a short checklist, so you can confirm cost will attribute correctly before you rely on it.
Checklist
-
Telemetry source. Your telemetry is produced by ADOT (managed harness, Runtime, or self-hosted with ADOT). If you use a non-ADOT OpenTelemetry setup on self-hosted compute, confirm it signs its export to the X-Ray endpoint and produces the model-call span. See Choose your setup path.
-
Transaction Search is on for the account and Region. This one-time per-account setup is needed for every setup; if you deploy with the AgentCore CLI,
agentcore deploycan turn it on for you. -
Tracing is on for the agent runtime and for each AgentCore resource the agent uses (Gateway, Memory, Code Interpreter, Browser). On the managed harness this is automatic; on AgentCore Runtime and self-hosted compute, turn it on with the console’s Enable tracing. Without it, only the agent’s model-call spans reach
aws/spans, so Runtime, Gateway, Memory, Code Interpreter, and Browser cost does not appear. -
Spans are reaching Observability. Invoke the agent, then open Observability in the AgentCore console and confirm the Spans view tab shows your agent’s spans (the view tabs are Overview, Sessions, Traces, and Spans). See See your first agent cost in the console.
-
A cost figure appears. Open the agent in the cost view and confirm an estimated cost shows, not a dash. See See your first agent cost in the console.
-
Identity is set (self-hosted).
OTEL_RESOURCE_ATTRIBUTESsetscloud.resource_id(without:runtime/),service.name, andservice.version. -
Attributes flow (self-hosted and plain-OTel).
aws.client.cloud.resource_id,session.id,aws.tenant.id, anduser.idare in baggage on every tool call and copied onto the agent’s own spans. See Pass the required session and agent attributes. -
Model-call span is correct. Each model call has a
CLIENTspan withgen_ai.operation.name,gen_ai.request.model, and input/output token counts. -
Metrics toggle on, if you intend to alarm. See Turn on cost metrics so you can alarm on them.
-
Tags applied to the agent’s AgentCore Runtime resource, if you intend to filter cost by tag (not available for agents hosted outside AgentCore Runtime).
If a check fails
-
A cost shows a dash → A cost shows a dash instead of a figure.
-
A session total looks short → A session cost looks too low or incomplete.
-
Cost lands on the wrong agent → Cost is attributed to the wrong agent.