The legend of a search expression often contains long, hard to read names. Dynamic labels build the label of every series from its properties, and update automatically.
procstat) metrics of the CloudWatch agent process.
memory_rss (1) and choose Graph search (2). Three rows match, one per instance (3).

[dimension: ${PROP('Dim.DimName')}] (1). DimName is only a placeholder, so the legend shows -- (2).
Choose the pencil icon in the Label column, replace the label with the line below (1) and choose Apply (2).
${PROP('Dim.process_name')} - ${PROP('Dim.InstanceId')} - ${PROP('MetricName')}

