Skip to content

Commit 9232614

Browse files
committed
fix: Set EMF metrics key correctly
It lives in the "CloudWatchMetrics" subdictionary, not in the "_aws" root dictionary. This was prevening metrics from showing up in the correct namespace in the cloudwatch web interface (they were listed under "local" instead of "PerfTests"). Signed-off-by: Patrick Roy <[email protected]>
1 parent 98ec7dd commit 9232614

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/host_tools/metrics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ def emit_raw_emf(emf_msg: dict):
105105
"AWS_EMF_LOG_GROUP_NAME", f"{namespace}-metrics"
106106
)
107107
emf_msg["_aws"]["LogStreamName"] = os.environ.get("AWS_EMF_LOG_STREAM_NAME", "")
108-
emf_msg["_aws"]["Namespace"] = namespace
108+
for metrics in emf_msg["_aws"]["CloudWatchMetrics"]:
109+
metrics["Namespace"] = namespace
109110

110111
emf_endpoint = urlparse(os.environ["AWS_EMF_AGENT_ENDPOINT"])
111112
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sock:

0 commit comments

Comments
 (0)