Skip to content
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

Tagging #312

Merged
merged 9 commits into from
Mar 8, 2021
Merged

Tagging #312

merged 9 commits into from
Mar 8, 2021

Conversation

jgpayvision
Copy link
Contributor

Support of tags or dimensions for the following providers:

It covers issue: #268

It contains a breaking change. The interface IStatsDPublisher has been modified to include the tags as Dictionary<string, string?>. The old methods of this interface have been included as extension methods at IStatsDPublisherExtensions.
Therefore:

  • Implementations of IStatsDPublisher will be broken after the change.
  • Former usage of IStatsDPublisher and StatsDPublisher will work as it was in the previous version.

Benchmarking

After the change

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.18363.1016 (1909/November2018Update/19H2)
Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=3.1.401
  [Host]     : .NET Core 3.1.7 (CoreCLR 4.700.20.36602, CoreFX 4.700.20.37001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.7 (CoreCLR 4.700.20.36602, CoreFX 4.700.20.37001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
BufferBased 248.0 ns 4.58 ns 4.29 ns - - - -
BufferBasedIgnoringTags 272.0 ns 3.61 ns 3.01 ns - - - -
BufferBasedIgnoringEmptyTags 256.3 ns 5.16 ns 5.94 ns - - - -
BufferBasedWithTagsFormatterAndNullTags 248.9 ns 4.86 ns 5.59 ns - - - -
BufferBasedWithTagsFormatter 661.2 ns 4.65 ns 4.35 ns - - - -
BufferBasedWithTagsFormatterAndEmptyTags 252.7 ns 3.36 ns 2.98 ns - - - -

Previous version

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.18363.1016 (1909/November2018Update/19H2)
Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=3.1.401
  [Host]     : .NET Core 3.1.7 (CoreCLR 4.700.20.36602, CoreFX 4.700.20.37001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.7 (CoreCLR 4.700.20.36602, CoreFX 4.700.20.37001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
BufferBased 226.8 ns 4.48 ns 3.97 ns - - - -

@jgpayvision jgpayvision requested a review from a team as a code owner January 18, 2021 21:17
@jgpayvision jgpayvision mentioned this pull request Jan 18, 2021
@martincostello martincostello added this to the v5.0.0 milestone Feb 8, 2021
Copy link
Member

@martincostello martincostello left a comment

Choose a reason for hiding this comment

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

Sorry for the delay in getting this reviewed.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/JustEat.StatsD/IStatsDPublisher.cs Show resolved Hide resolved
src/JustEat.StatsD/TagsFormatters/InfluxDbTagsFormatter.cs Outdated Show resolved Hide resolved
src/JustEat.StatsD/TagsFormatters/NoOpTagsFormatter.cs Outdated Show resolved Hide resolved
src/JustEat.StatsD/TagsFormatters/StatsDTagsFormatter.cs Outdated Show resolved Hide resolved
@martincostello martincostello changed the base branch from master to main February 17, 2021 12:46
jgpayvision and others added 2 commits March 6, 2021 12:27
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
@codecov
Copy link

codecov bot commented Mar 6, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@8999ed9). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #312   +/-   ##
=======================================
  Coverage        ?   94.45%           
=======================================
  Files           ?       27           
  Lines           ?      883           
  Branches        ?        0           
=======================================
  Hits            ?      834           
  Misses          ?       49           
  Partials        ?        0           
Flag Coverage Δ
linux 93.65% <0.00%> (?)
macos 94.11% <0.00%> (?)
windows 93.99% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8999ed9...85d85cd. Read the comment docs.

@jgpayvision
Copy link
Contributor Author

Sorry for the delay @martincostello.

All changes uploaded except the change from Dictionary to IDictionary.

Use tags.
@martincostello martincostello merged commit 0cfdb1f into justeattakeaway:main Mar 8, 2021
@martincostello
Copy link
Member

Thanks for your contribution @gomete - we'll need to make some changes internally to prepare other libraries that depend on JustEat.StatsD due to the breaking changes to the interface, so there'll be a bit of lag on getting this actually published to NuGet.org.

I'll try and publish a 5.0.0 beta to NuGet.org at some point this week.

@jgpayvision
Copy link
Contributor Author

jgpayvision commented Mar 8, 2021 via email

@martincostello martincostello linked an issue Dec 14, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for tags/dimensions
3 participants