Skip to content

fix(datadog): report consumer username tag#11354

Merged
moonming merged 2 commits into
apache:masterfrom
bzp2010:fix-datadog-consumer-metrics
Jun 17, 2024
Merged

fix(datadog): report consumer username tag#11354
moonming merged 2 commits into
apache:masterfrom
bzp2010:fix-datadog-consumer-metrics

Conversation

@bzp2010

@bzp2010 bzp2010 commented Jun 16, 2024

Copy link
Copy Markdown
Contributor

Description

When datadog tries to upload metrics containing the consumer username tag, it fails.
Basically the code there tries to splice a string with a table (without __tostring), which is completely wrong, and it has had this problem since the original version of the plugin, which went undetected because the original authors didn't write test cases related.

The previous author of PR #10934 was closed by bot for not adding test cases and no longer responding. Thanks to the issue reporter and the author of the previous PR.

Fixes #9269

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@bisakhmondal bisakhmondal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
Thanks for the fix🎉

@juzhiyuan juzhiyuan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@moonming
moonming merged commit 1a45d1d into apache:master Jun 17, 2024
ssignik added a commit to ssignik/apisix that referenced this pull request Jun 21, 2024
fix(datadog): report consumer username tag (apache#11354)
shreemaan-abhishek pushed a commit to shreemaan-abhishek/apisix that referenced this pull request Jan 2, 2026
copy of apache#11354

---------

Signed-off-by: Ashish Tiwari <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: datadog plugin failed to send metric when consumer is used with route for authentication

6 participants