-
Notifications
You must be signed in to change notification settings - Fork 420
Docs: Mention that datadog metric tags replace default_tags #2990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
@leandrodamascena i thought they are additive too? except when they're not unique (explicit override vs default) @ecokes let's wait for Leandro. I suspect this is a bug in the example you provided but maybe Leandro or @roger-zhangg identified a problem I'm unaware |
It’s a bug!! Thank you so much for reporting it!!
Line 330 — we’ll need to filter for duplicates first and use precedence,
and it’s also missing a functional test for this case
https://github.com/aws-powertools/powertools-lambda-python/blob/develop/aws_lambda_powertools/metrics/provider/datadog/datadog.py
…On Wed, 23 Aug 2023 at 19:35, boring-cyborg[bot] ***@***.***> wrote:
Thanks for opening your first issue here! We'll come back to you as soon
as we can.
In the meantime, check out the #python channel on our Powertools for AWS
Lambda Discord: Invite link <https://discord.gg/B8zZKbbyET>
—
Reply to this email directly, view it on GitHub
<#2990 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZPQBFF4CRTFJVA5LIG53DXWY5N3ANCNFSM6AAAAAA332EPRY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
.com>
|
@heitorlessa Thanks for taking a look, I was wondering if it might be a bug myself. |
Hello @ecokes! Thanks for reporting this. I'm working on submitting a fix for this. We usually release new versions on Friday, but if it's too critical for you at this moment, we can release a patch release tomorrow. Please let me know what you prefer :) Thanks |
@leandrodamascena, Friday is fine with me, thanks for fixing it so quickly! |
|
This is now released under 2.23.1 version! |
What were you searching in the docs?
First off, I've been enjoying this library and I think the docs are pretty great overall.
I did have one point of confusion I wanted to clarify. I've been using the DatadogMetrics class, (using this section of the docs) to add tags to metrics. I was surprised to find that adding tags in the
add_metric
method like this:results in any default tags that were added to the metrics class, like this:
getting removed from the metric. I assumed that default tags and additional one off tags would be combined in that case, so that the metric would end up as:
However, the metric instead comes out as:
I assumed I had configured something wrong for awhile, until I found this section of the code. So it looks like that's the intended behavior, but it would be helpful to add a line in the docs identifying that default_tags and metric tags are one or the other, not additive.
Is this related to an existing documentation section?
https://docs.powertools.aws.dev/lambda/python/latest/core/metrics/datadog/#adding-tags
How can we improve?
Mention that metric tags overwrite default tags instead of being appended.
Got a suggestion in mind?
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: