
I Tried Exporting Kiro Activity Reports with OpenTelemetry and Aggregating Them with PromQL
This page has been translated by machine translation. View original
Introduction
For Kiro Enterprise activity reports, CSV output to S3 was supported in February 2026, and output via OpenTelemetry (OTel) was supported in September 2026.
Metrics ingested into CloudWatch via OTel can be queried with PromQL.
In this article, I enabled both CSV output to S3 and the setting to output to CloudWatch via OTel, and verified whether the values output to the S3 CSV for the same day could also be retrieved with PromQL.
Verification
In an environment with OTel export enabled, I retrieved the metrics that arrived in CloudWatch in us-east-1 using PromQL.
OTel export configuration
I checked the configuration required to retrieve data with PromQL, from both the requirements in the official documentation and the running configuration.
Kiro sends metrics once a day at 02:00 UTC. The metrics for a given activity day are sent on the following day. Dates for which sending fails are not resent, and no backfill is performed.
When the destination is CloudWatch, a bearer API key is required. This is because Kiro cannot sign the export with SigV4. The endpoint is https://monitoring.<region>.amazonaws.com/v1/metrics. The protocol is HTTP/protobuf, and the authentication header is Authorization=Bearer <api-key>.
The KMS key, the Secrets Manager secret, and the Kiro profile must be in the same region. The default aws/secretsmanager key cannot be used to encrypt the secret, because Kiro reads the secret from a different AWS account. Data points contain the IAM Identity Center user ID and, when it can be resolved, the email address. These are stored as CloudWatch metric labels, so they become visible to anyone who can access PromQL or the dashboards.
The resources I created were a CMK, an IAM user for sending to CloudWatch with a service-specific API key, and a secret containing the endpoint and credentials. This time, I created the secret in the same account as the Kiro profile. put-key-policy replaces the entire key policy. In kms-key-policy.json, I kept the default Enable IAM User Permissions statement and added a statement for Kiro.
# 1. CMK を作成する(既定の aws/secretsmanager では Kiro から復号できない)
aws kms create-key --description "Kiro OTel export secret encryption" --region us-east-1
aws kms create-alias --alias-name alias/kiro-otel-export --target-key-id <key-id> --region us-east-1
aws kms put-key-policy --key-id <key-id> --policy-name default \
--policy file://kms-key-policy.json --region us-east-1
# 2. CloudWatch へ送信するための IAM ユーザーと API キーを作る
aws iam create-user --user-name kiro-otel-metrics-user
aws iam attach-user-policy --user-name kiro-otel-metrics-user \
--policy-arn arn:aws:iam::aws:policy/CloudWatchAPIKeyAccess
aws iam create-service-specific-credential --user-name kiro-otel-metrics-user \
--service-name cloudwatch.amazonaws.com
# 3. エンドポイントと認証情報をシークレットに入れる(Kiro プロファイルと同一リージョン)
# API キーをシェル履歴に残したくない場合は --secret-string file://secret.json でも渡せる
aws secretsmanager create-secret --name kiro-otel-export --kms-key-id <key-id> \
--secret-string '{"OTEL_EXPORTER_OTLP_ENDPOINT":"https://monitoring.us-east-1.amazonaws.com/v1/metrics","OTEL_EXPORTER_OTLP_HEADERS":"Authorization=Bearer <SERVICE_CREDENTIAL_SECRET>"}' \
--region us-east-1
aws secretsmanager put-resource-policy --secret-id kiro-otel-export \
--resource-policy file://secret-resource-policy.json --region us-east-1
Enabling the export itself is done in the Kiro console.

In the "Enable usage metrics logs" dialog, I checked both CSV report and OpenTelemetry. For Protocol I chose HTTP (OTLP over HTTP (http/protobuf)), and for authentication I selected "Use an existing secret" and specified the ARN of the existing secret.
I checked the current configuration of the resources created with the commands above. Both the KMS key policy and the Secrets Manager resource policy grant permissions to q.amazonaws.com. The secret's resource policy is the minimum permission for verification, and it has no condition keys to restrict the caller.
Running configuration (KMS key policy, secret, IAM, list-metrics)
{
"kms_get_key_policy.Policy の Kiro 向けステートメント": {
"Sid": "AllowKiroDecryptViaSecretsManager",
"Effect": "Allow",
"Principal": {
"Service": "q.amazonaws.com"
},
"Action": [
"kms:Decrypt",
"kms:DescribeKey"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"kms:ViaService": "secretsmanager.us-east-1.amazonaws.com"
}
}
},
"secret_describe": {
"Name": "kiro-otel-export",
"KmsKeyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxff",
"LastAccessedDate": "2026-09-14T09:00:00+09:00"
},
"secret_resource_policy.ResourcePolicy のステートメント": {
"Sid": "AllowKiroGetSecretValue",
"Effect": "Allow",
"Principal": {
"Service": "q.amazonaws.com"
},
"Action": "secretsmanager:GetSecretValue",
"Resource": "*"
},
"iam_attached_user_policies": [
{
"PolicyName": "CloudWatchAPIKeyAccess",
"PolicyArn": "arn:aws:iam::aws:policy/CloudWatchAPIKeyAccess"
}
],
"cloudwatch list-metrics --namespace kiro": []
}
Metrics ingested via OTLP are not visible from the conventional metrics API. The list-metrics response with kiro specified as the namespace was empty. The official documentation says the same: the targets of GetMetricData, ListMetrics, and so on are only CloudWatch Metrics (Classic). For OpenTelemetry Metrics, it says to use the PromQL query API.
How to run PromQL
The PromQL HTTP API is called with SigV4 signing. The SigV4 service name is monitoring. The endpoint is https://monitoring.<region>.amazonaws.com/api/v1/<operation>.
The required IAM permissions differ by API operation. /api/v1/query and /api/v1/query_range require both cloudwatch:GetMetricData and cloudwatch:ListMetrics. The series and label-related API operations require only ListMetrics.
As limits, the documentation states a maximum range of 7 days per request, a maximum of 500 series returned per query, and an execution timeout of 20 seconds. The table of supported regions has three columns: OTLP metrics ingestion, PromQL queries, and Query Studio. The listed regions, including us-east-1 and ap-northeast-1, are all documented as supporting all three columns.
Since signing is required, I prepared a minimal client that does only the signing with botocore.
REGION = "us-east-1"
HOST = f"https://monitoring.{REGION}.amazonaws.com"
SERVICE = "monitoring"
def call(path, params):
creds = botocore.session.get_session().get_credentials().get_frozen_credentials()
if METHOD == "GET":
qs = urllib.parse.urlencode(params, doseq=True, quote_via=urllib.parse.quote)
url = f"{HOST}{path}" + (f"?{qs}" if qs else "")
req = AWSRequest(method="GET", url=url)
SigV4Auth(creds, SERVICE, REGION).add_auth(req)
return _send(urllib.request.Request(url, headers=dict(req.headers), method="GET"))
I saved this as promql.py and ran it as follows.
# メトリクス名の一覧(start / end に epoch 秒を渡す。付けないと空配列が返る)
python3 promql.py names 1788825600 1789344000
# ラベル名の一覧
python3 promql.py labels 1788825600 1789344000
# インスタントクエリ(レポート日 2026-09-13 のデータポイントは 2026-09-14T00:00Z に立つ)
python3 promql.py query 'sum by ("kiro.client.type") ({"kiro.daily.credits", date="2026-09-13"})' 1789344000
Full text of promql.py
#!/usr/bin/env python3
"""CloudWatch PromQL (Prometheus 互換 API) を SigV4 で叩く最小クライアント.
usage:
promql.py labels <start-epoch> <end-epoch>
promql.py names <start-epoch> <end-epoch>
promql.py date-values <start-epoch> <end-epoch>
promql.py series '<selector>'
promql.py query '<promql>' [epoch-seconds]
promql.py query_range '<promql>' <start-epoch> <end-epoch> <step>
"""
import json
import sys
import botocore.session
from botocore.auth import SigV4Auth
from botocore.awsrequest import AWSRequest
import urllib.request
import urllib.parse
REGION = "us-east-1"
HOST = f"https://monitoring.{REGION}.amazonaws.com"
SERVICE = "monitoring"
METHOD = "GET"
def call(path, params):
creds = botocore.session.get_session().get_credentials().get_frozen_credentials()
if METHOD == "GET":
qs = urllib.parse.urlencode(params, doseq=True, quote_via=urllib.parse.quote)
url = f"{HOST}{path}" + (f"?{qs}" if qs else "")
req = AWSRequest(method="GET", url=url)
SigV4Auth(creds, SERVICE, REGION).add_auth(req)
return _send(urllib.request.Request(url, headers=dict(req.headers), method="GET"))
body = urllib.parse.urlencode(params, doseq=True)
url = f"{HOST}{path}"
req = AWSRequest(
method="POST",
url=url,
data=body,
headers={"Content-Type": "application/x-www-form-urlencoded"},
)
SigV4Auth(creds, SERVICE, REGION).add_auth(req)
prepared = urllib.request.Request(
url, data=body.encode(), headers=dict(req.headers), method="POST"
)
return _send(prepared)
def _send(prepared):
try:
with urllib.request.urlopen(prepared) as resp:
return resp.status, resp.read().decode()
except urllib.error.HTTPError as e:
return e.code, e.read().decode()
def main():
cmd = sys.argv[1]
# /api/v1/labels と /api/v1/label/<name>/values は start / end を付けないと
# 空配列が返る。第2・第3引数で epoch 秒を受け取る。
window = {}
if cmd in ("labels", "names", "date-values") and len(sys.argv) > 3:
window = {"start": sys.argv[2], "end": sys.argv[3]}
if cmd == "labels":
status, out = call("/api/v1/labels", window)
elif cmd == "names":
status, out = call("/api/v1/label/__name__/values", window)
elif cmd == "date-values":
status, out = call("/api/v1/label/date/values", window)
elif cmd == "series":
status, out = call("/api/v1/series", {"match[]": sys.argv[2]})
elif cmd == "query":
p = {"query": sys.argv[2]}
if len(sys.argv) > 3:
p["time"] = sys.argv[3]
status, out = call("/api/v1/query", p)
elif cmd == "query_range":
p = {
"query": sys.argv[2],
"start": sys.argv[3],
"end": sys.argv[4],
"step": sys.argv[5],
}
status, out = call("/api/v1/query_range", p)
else:
print(__doc__)
sys.exit(2)
print(f"HTTP {status}")
try:
print(json.dumps(json.loads(out), indent=2, ensure_ascii=False))
except json.JSONDecodeError:
print(out)
if __name__ == "__main__":
main()
The metric names retrieved are as follows. When run without passing a time range, an empty array was returned.
{
"status": "success",
"data": [
"kiro.daily.conversations",
"kiro.daily.credits",
"kiro.daily.messages",
"kiro.daily.model_messages",
"kiro.daily.overage_credits",
"otel.sdk.metric_reader.collection.duration"
]
}
Five Kiro daily metrics and one OTel SDK internal metric had arrived.
The list of label names included labels corresponding to date, user, client type, model name, subscription, and usage limit.
List of retrieved label names
{
"status": "success",
"data": [
"@aws.account",
"@aws.region",
"@instrumentation.@name",
"@instrumentation.@schema_url",
"@instrumentation.@version",
"@resource.@schema_url",
"@resource.kiro.account.id",
"@resource.kiro.profile.arn",
"@resource.kiro.profile.id",
"@resource.service.name",
"@resource.telemetry.sdk.language",
"@resource.telemetry.sdk.name",
"@resource.telemetry.sdk.version",
"__monotonicity__",
"__name__",
"__temporality__",
"__type__",
"__unit__",
"date",
"kiro.client.type",
"kiro.model.name",
"kiro.overage.cap",
"kiro.overage.enabled",
"kiro.subscription.tier",
"kiro.usage.limit",
"kiro.user.email",
"kiro.user.id",
"kiro.user.new",
"otel.component.name",
"otel.component.type"
]
}
The selector must explicitly include a metric name. When I specified the metric name only with a regular expression, a 400 was returned.
Response when the metric name is specified only with a regular expression
{
"query": "{__name__=~\"kiro.daily..*\"}",
"http": 400,
"response": {
"error": "Selector must have a metric name. Found matchers: [__name__]",
"errorType": "bad_data",
"status": "error"
}
}
Reconciliation with the CSV
The same content also appears in the S3 CSV report. The CSV has one row per date, user, and client type.
Date,UserId,Client_Type,Chat_Conversations,Credits_Used,Overage_Cap,Overage_Credits_Used,Overage_Enabled,ProfileId,Subscription_Tier,Total_Messages,New_User,User_Email,Usage_Limit,auto_messages,claude_opus_5_messages,claude_sonnet_4.6_messages,gpt_5.6_luna_messages,gpt_5.6_sol_messages,gpt_5.6_terra_messages
2026-09-13,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx0a,KIRO_CLI,323,752.1328506192372,5000.0,0.0,true,arn:aws:codewhisperer:us-east-1:123456789012:profile/xxxxxxxxxxxxx,POWER,1401,false,xxxxxxxx-a@example.com,10000,1401,0,0,0,0,0
The correspondence between columns and metrics/labels is as follows.
| CSV column | PromQL |
|---|---|
| Credits_Used | kiro.daily.credits |
| Overage_Credits_Used | kiro.daily.overage_credits |
| Total_Messages | kiro.daily.messages |
| Chat_Conversations | kiro.daily.conversations |
<model>_messages |
kiro.model.name label of kiro.daily.model_messages |
| Date | date label |
| UserId | kiro.user.id label |
| Client_Type | kiro.client.type label |
| Subscription_Tier | kiro.subscription.tier label |
| Usage_Limit | kiro.usage.limit label |
| Overage_Cap / Overage_Enabled | kiro.overage.cap / kiro.overage.enabled labels |
| New_User | kiro.user.new label |
| User_Email | kiro.user.email label |
Because the CSV is split into files per client type, I summed up the three files for the same day together.
for path in sys.argv[1:]:
for row in csv.DictReader(open(path)):
key = (row["Date"][:10], row["Client_Type"])
credits[key] += float(row["Credits_Used"] or 0)
messages[row["Date"][:10]] += int(row["Total_Messages"] or 0)
# 同じ日の CLI / IDE / WEB の 3 ファイルをまとめて集計する
python3 csv_aggregate.py s3-2026-09-12-*.csv s3-2026-09-13-*.csv
The credits per client type and the daily message counts were output.
2026-09-12 KIRO_CLI 929.981886
2026-09-12 KIRO_IDE 30.041061
2026-09-12 KIRO_WEB 34.783152
2026-09-13 KIRO_CLI 1795.626213
2026-09-13 KIRO_IDE 70.219843
2026-09-13 KIRO_WEB 29.099002
2026-09-12 Total_Messages 2200
2026-09-13 Total_Messages 3551
On the PromQL side, I summed the credits by client type and queried the same day.
{
"query": "sum by (\"kiro.client.type\") ({\"kiro.daily.credits\", date=\"2026-09-13\"})",
"response": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"kiro.client.type": "KIRO_IDE"
},
"value": [
1789344000.0,
"70.21984331824211"
]
},
{
"metric": {
"kiro.client.type": "KIRO_CLI"
},
"value": [
1789344000.0,
"1795.6262133304313"
]
},
{
"metric": {
"kiro.client.type": "KIRO_WEB"
},
"value": [
1789344000.0,
"29.099002319237147"
]
}
]
}
}
}
Here are the credits for the report date 2026-09-13 side by side. The S3 CSV side is the sum of the three files for KIRO_CLI / KIRO_IDE / KIRO_WEB.
| Client type | S3 CSV | PromQL |
|---|---|---|
| KIRO_CLI | 1795.626213 | 1795.6262133304313 |
| KIRO_IDE | 70.219843 | 70.21984331824211 |
| KIRO_WEB | 29.099002 | 29.099002319237147 |
The S3 CSV column in the table above has values rounded to 6 decimal places by the output format of the aggregation script. The Credits_Used in the CSV itself contains all float digits, just like PromQL. The message counts also matched: 2200 for 2026-09-12 and 3551 for 2026-09-13. The PromQL-side values are the ones obtained by the SQL aggregation described later.
Retrieving the usage breakdown
The breakdown by client type could be obtained directly with the query in the previous section. Message counts by model are summed by the model name label.
{
"query": "sum by (\"kiro.model.name\") ({\"kiro.daily.model_messages\", date=\"2026-09-13\"})",
"response": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"kiro.model.name": "gpt-5.6-sol"
},
"value": [
1789344000.0,
"37"
]
},
{
"metric": {
"kiro.model.name": "gpt-5.6-luna"
},
"value": [
1789344000.0,
"8"
]
},
{
"metric": {
"kiro.model.name": "claude-opus-5"
},
"value": [
1789344000.0,
"714"
]
},
{
"metric": {
"kiro.model.name": "auto"
},
"value": [
1789344000.0,
"2443"
]
},
{
"metric": {
"kiro.model.name": "gpt-5.6-terra"
},
"value": [
1789344000.0,
"345"
]
},
{
"metric": {
"kiro.model.name": "claude-sonnet-4.6"
},
"value": [
1789344000.0,
"4"
]
}
]
}
}
}
Values that were split into per-model columns in the CSV were returned as series of a single metric in PromQL.
The credit aggregation can also be placed in a dashboard widget. Write the PromQL in the widget's properties.data.queries and specify PromQL in language.
{
"type": "chart",
"x": 0,
"y": 0,
"width": 12,
"height": 6,
"properties": {
"view": "line",
"title": "日次クレジット(クライアント種別)",
"region": "us-east-1",
"data": {
"queries": [
{
"id": "credits_by_client",
"type": "cloudwatch-metrics",
"language": "PromQL",
"query": "sum by (\"kiro.client.type\") ({\"kiro.daily.credits\"})",
"label": "__verbose__",
"step": 86400
}
]
},
"plotOptions": {
"legend": {
"position": "bottom",
"show": true
},
"style": {
"lineWidth": 2
}
}
}
}
I saved a definition with five widgets lined up as dashboard-kiro-otel.json and created the dashboard.
aws cloudwatch put-dashboard \
--dashboard-name kiro-otel-promql \
--dashboard-body file://dashboard-kiro-otel.json \
--region us-east-1
The response returned validation messages for five widgets saying that the coordinate specification in the widget definition is ignored.
{
"DashboardValidationMessages": [
{
"DataPath": "/widgets/0",
"Message": "The \"x\" property is not expected to be part of a widget definition, will be ignored"
}
]
}
The created dashboard has a line chart of daily credits by client type and a number widget showing the latest value. I also lined up a pie chart of messages by model, a bar chart of the top 10 heavy users, and line charts of credits and overage credits by subscription tier. The number widget displays the value of the latest data point, not the total over the period.

To fit within the upper limit of the time range per request (8 days, as measured later), this dashboard is set to a one-week display.
Monthly aggregation and putting it in a DB
I'll check the constraints when retrieving the monthly total of credits with PromQL.
{
"query": "sum({\"kiro.daily.credits\"})",
"http": 400,
"response": {
"error": "Query time range 1209600000ms exceeds 691200000ms limit",
"errorType": "bad_data",
"status": "error"
}
}
The upper limit was 691200000 milliseconds, that is, 8 days. The documentation says 7 days, so the measured value is one day longer.
{
"query": "sum(sum_over_time({\"kiro.daily.credits\"}[7d]))",
"http": 400,
"response": {
"error": "Range selector 604800000ms exceeds 86400000ms limit",
"errorType": "bad_data",
"status": "error"
}
}
The range selector is limited to 86400000 milliseconds, that is, 1 day. Since the monthly total cannot be obtained in one request, I wrote a script that splits the period into windows of 8 days or less and merges them by the date label. Because the timestamp of a data point is set at 00:00 UTC on the day after the report date, the query windows are shifted back by one day.
MAX_WINDOW_DAYS = 8 # 実測の上限(ドキュメントの記載は 7 日)
def chunks(first, last):
"""レポート日 first..last を 8 日以下の窓に分割する。
データポイントのタイムスタンプはレポート日 +1 日 00:00 UTC に立つため、
問い合わせ窓は 1 日後ろへずらす。
"""
out = []
cur = first
while cur <= last:
end = min(cur + datetime.timedelta(days=MAX_WINDOW_DAYS - 1), last)
out.append(
(
cur,
end,
int(
datetime.datetime.combine(
cur + datetime.timedelta(days=1),
datetime.time(),
datetime.UTC,
).timestamp()
),
int(
datetime.datetime.combine(
end + datetime.timedelta(days=1),
datetime.time(),
datetime.UTC,
).timestamp()
),
)
)
cur = end + datetime.timedelta(days=1)
return out
I saved this as monthly_credits.py and retrieved the previous month and the current month for one user each. One month is split into 4 requests in each case.
# 前月(2026-08)
python3 monthly_credits.py 2026-08 <kiro.user.id> --raw-out monthly-2026-08.json
# 当月(2026-09)
python3 monthly_credits.py 2026-09 <kiro.user.id> --raw-out monthly-2026-09.json
For the previous month, all 4 chunks returned empty results.
{
"chunk": 1,
"report_date_from": "2026-08-01",
"report_date_to": "2026-08-08",
"start_epoch": 1785628800,
"end_epoch": 1786233600,
"http_status": 200,
"response": {
"status": "success",
"data": {
"resultType": "matrix",
"result": []
}
}
}
It was not possible to go back in PromQL to before the month in which the export was enabled. For the current month, series were returned, and the first chunk contained KIRO_IDE for 2026-09-03.
Response for chunk 1 of the current month (first series)
{
"chunk": 1,
"report_date_from": "2026-09-01",
"report_date_to": "2026-09-08",
"start_epoch": 1788307200,
"end_epoch": 1788912000,
"http_status": 200,
"response": {
"status": "success",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"date": "2026-09-03",
"kiro.client.type": "KIRO_IDE"
},
"values": [
[
1788480000.0,
"81.07452051907131"
]
]
}
]
}
}
}
I merged the results of the 4 requests and sorted them by date. Below is an excerpt of 5 days, from 2026-09-03 to 2026-09-07. The chunks from 09-17 onward targeted future dates, so no data was returned.
| date | KIRO_CLI | KIRO_IDE | KIRO_WEB | total |
|---|---|---|---|---|
| 2026-09-03 | 0.000000 | 81.074521 | 34.719170 | 115.793691 |
| 2026-09-04 | 0.000000 | 567.937403 | 22.614996 | 590.552399 |
| 2026-09-05 | 268.559799 | 236.676726 | 19.740736 | 524.977261 |
| 2026-09-06 | 1231.302509 | 0.000000 | 67.092049 | 1298.394558 |
| 2026-09-07 | 997.004132 | 22.291942 | 30.999795 | 1050.295869 |
Because aggregating monthly values requires splitting requests and merging results yourself, I also tried shifting the aggregation to the DB side.
METRICS = [
"kiro.daily.credits",
"kiro.daily.overage_credits",
"kiro.daily.messages",
"kiro.daily.conversations",
"kiro.daily.model_messages",
]
# 複数メトリクスを `or` で連結すると、ラベルセットが同一の系列は左辺に畳まれて消える。
# メトリクス名を保持したままフラット化するため、ここではメトリクスごとに 1 リクエストずつ発行する
# (`label_replace` で名前を通常ラベルへ写せば 1 リクエストにまとめられる)
I dumped 2 days' worth and loaded it into SQLite.
# 2 日分の生シリーズを全メトリクス分ダンプしてフラット CSV にする
python3 dump_raw.py 2026-09-12 2026-09-13 --outdir raw
# SQLite に投入して SQL で集計する
python3 load_sqlite.py raw/promql-flat-2026-09-12_2026-09-13.csv kiro_otel.db
The output CSV has the labels as columns as they are.
metric,date,kiro.user.id,kiro.user.email,kiro.client.type,kiro.model.name,kiro.subscription.tier,kiro.usage.limit,kiro.overage.enabled,kiro.overage.cap,kiro.user.new,__unit__,__type__,__temporality__,timestamp,value
kiro.daily.credits,2026-09-12,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxa0,xxxxxxxx-b@example.com,KIRO_CLI,,PRO,1000,true,5000,false,credits,Sum,delta,2026-09-13T00:00:00+00:00,17.16783699751244
Here are the destination table and the SQL that retrieves daily credits and messages across metrics.
CREATE TABLE kiro_otel (
metric TEXT, report_date TEXT, user_id TEXT, email TEXT,
client_type TEXT, model_name TEXT, tier TEXT, usage_limit INTEGER,
overage_enabled TEXT, overage_cap INTEGER, is_new TEXT,
unit TEXT, type TEXT, temporality TEXT, ts TEXT, value REAL
);
SELECT report_date,
ROUND(SUM(CASE WHEN metric='kiro.daily.credits' THEN value END), 3) AS credits,
CAST(SUM(CASE WHEN metric='kiro.daily.messages' THEN value END) AS INT) AS messages,
CAST(SUM(CASE WHEN metric='kiro.daily.conversations' THEN value END) AS INT) AS conversations,
ROUND(SUM(CASE WHEN metric='kiro.daily.overage_credits' THEN value END), 3) AS overage
FROM kiro_otel GROUP BY report_date ORDER BY report_date;
The period total and the cross-metric reconciliation each came back in a single statement.
--- 期間合計(PromQL では 8 日窓の分割が必要な集計)
from_date | to_date | total_credits
2026-09-12 | 2026-09-13 | 2889.751158
--- クレジットとメッセージを1クエリで突き合わせ(PromQL の or では畳まれる組み合わせ)
report_date | credits | messages | conversations | overage
2026-09-12 | 994.806000 | 2200 | 277 | 0.000000
2026-09-13 | 1894.945000 | 3551 | 502 | 381.488000
Both totals across periods and reconciliation across metrics could be aggregated in a single statement with SQL. Producing the same content in PromQL would require splitting into 8-day windows and a transformation that maps metric names to regular labels.
Pricing
The fixed costs newly added by enabling the OTel export are two: the CMK and the secret. CloudWatch-side ingestion and query charges, the free tier, and small API call charges are excluded from the calculations in this article.
A customer managed key in KMS costs $1/month per key. Secrets Manager costs $0.40/month per secret.
Summary
I confirmed that Kiro activity reports can be sent to CloudWatch via OTel export, and that the same content as the S3 CSV report can be retrieved with PromQL.
Within the scope verified in this article, it turned out to be difficult to complete monthly and cross-period aggregation with CloudWatch alone. On the other hand, if you already have an OTel-compatible visualization environment such as Grafana or Datadog, it becomes an option for integrating Kiro usage into your dashboards.
If you want to aggregate activity reports monthly or across periods on AWS, first try the approach of analyzing the S3 CSV as the data source with Athena or similar.
