-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add GraphiteDB tags formatter #818
Add GraphiteDB tags formatter #818
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you bump the version to 5.1.0 please?
Line 4 in 361a3c9
<VersionPrefix>5.0.2</VersionPrefix> |
Otherwise this looks good - thanks for the contribution!
/// <summary> | ||
/// Gets a GraphiteDB tags formatter. | ||
/// </summary> | ||
public static IStatsDTagsFormatter GraphiteDb => new GraphiteDbTagsFormatter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This highlights that we should have probably made these singletons via { get; } = ...
rather than creating a new instance on every access.
I'll fix that in a separate PR after this is merged.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #818 +/- ##
==========================================
+ Coverage 83.82% 84.06% +0.23%
==========================================
Files 28 29 +1
Lines 674 684 +10
Branches 151 151
==========================================
+ Hits 565 575 +10
Misses 67 67
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Make formatters singletons. See #818 (comment).
Make formatters singletons. See #818 (comment).
Thanks again for your contribution @tuyndoan - your changes are available in JustEat.StatsD v5.1.0 📦 which is now available from NuGet.org 🙇 |
Add GraphiteDB Tags Formatter
Description
Add support for GraphiteDB tags formatting in StatsD metrics. The new formatter allows tags to be placed right after the bucket name using GraphiteDB's specific format:
;tag1=value1;tag2;tag3=value3
.Changes
GraphiteDbTagsFormatter
class implementing StatsD tags formatting for GraphiteDBExample Outputs