Skip to content

Commit

Permalink
fix: Set EMF metrics key correctly
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
roypat committed Oct 9, 2023
1 parent 98ec7dd commit 9232614
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/host_tools/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def emit_raw_emf(emf_msg: dict):
"AWS_EMF_LOG_GROUP_NAME", f"{namespace}-metrics"
)
emf_msg["_aws"]["LogStreamName"] = os.environ.get("AWS_EMF_LOG_STREAM_NAME", "")
emf_msg["_aws"]["Namespace"] = namespace
for metrics in emf_msg["_aws"]["CloudWatchMetrics"]:
metrics["Namespace"] = namespace

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

0 comments on commit 9232614

Please sign in to comment.