-
Notifications
You must be signed in to change notification settings - Fork 14
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
Disallow duplicate dimension sets #31
Labels
Comments
Ran two tests: Test 1: private static void EmitMetric(ILogger logger, IMetricsLogger metrics)
{
var ds1 = new DimensionSet();
ds1.AddDimension("D1", "d1.1");
var ds2 = new DimensionSet();
ds2.AddDimension("D1", "d1.2");
var ds3 = new DimensionSet();
ds3.AddDimension("D3", "d3.1");
ds3.AddDimension("D4", "d4.1");
var ds4 = new DimensionSet();
ds4.AddDimension("D3", "d3.2");
ds4.AddDimension("D4", "d4.2");
metrics.PutDimensions(ds1); // only this line is different
metrics.PutDimensions(ds2);
metrics.PutDimensions(ds3);
metrics.PutDimensions(ds4);
metrics.PutMetric("Metric1", 1.0);
metrics.Flush();
} Test 2: private static void EmitMetric(ILogger logger, IMetricsLogger metrics)
{
var ds1 = new DimensionSet();
ds1.AddDimension("D1", "d1.1");
var ds2 = new DimensionSet();
ds2.AddDimension("D1", "d1.2");
var ds3 = new DimensionSet();
ds3.AddDimension("D3", "d3.1");
ds3.AddDimension("D4", "d4.1");
var ds4 = new DimensionSet();
ds4.AddDimension("D3", "d3.2");
ds4.AddDimension("D4", "d4.2");
metrics.SetDimensions(ds1); // only this line is different
metrics.PutDimensions(ds2);
metrics.PutDimensions(ds3);
metrics.PutDimensions(ds4);
metrics.PutMetric("Metric1", 1.0);
metrics.Flush();
} Output of test 1:
Output of test 2:
It seems like when |
markkuhn
added a commit
to markkuhn/aws-embedded-metrics-dotnet
that referenced
this issue
Aug 15, 2022
markkuhn
added a commit
to markkuhn/aws-embedded-metrics-dotnet
that referenced
this issue
Aug 17, 2022
markkuhn
added a commit
to markkuhn/aws-embedded-metrics-dotnet
that referenced
this issue
Sep 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related issues:
Currently duplicate dimension set are being allowed:
Example:
This creates
Instead of:
The text was updated successfully, but these errors were encountered: