Closed thepalbi closed 2 months ago
@kgeckhart @cristiangreco have a few questions on how to best implement this:
aws_account_info
metrics, since it might be helpful to quickly look metrics by the alias, such as when using an account id@kgeckhart as for 4), since this depends on IncludeContextOnInfoMetrics
being enabled (since it consumes the contexts configured in each resources), and that's an opt-in flag; and at most it generates one active series per account, we could keep this under the same context. Otherwise, we could add a new config-wide (at the root level) config, to toggle if the user wants or not aws_account_info
metrics.
Apart from that, the rest should be good.
Added the required perm to the suggested policy.
A possibility to add account_alias to all metrics would still be valuable. There is no means to have a single way to tag different namespace resources with some information and the account alias could be used to propagate such data without needing to do account_id to value mappings later on.
I'm also tempted to say that this feature could be part of IncludeContextOnInfoMetrics
. I see the point that it's just one new metric, but I guess that the account_alias info makes most sense next to the account_id rather than as a separate information.
I also prefer to include this as an extension of what IncludeContextOnInfoMetrics
, inlining the account_alias
label in all metrics, side by side with account_id
. FYI @kgeckhart
@cristiangreco implemented all inlining the account_alias
when available.
AWS supports creating something called AWS account aliases. This are human friendly name that can be used to easily identify accounts. An account can have at most a single account alias (docs), and aliases are unique across an AWS network partition (docs).
This PR explores the possibility of pulling the AWS account alias, and if there's one, adding it as an
account_alias
to every metric, much like we addaccount_id
.Sample metric with acct alias
TODO