Skip to content

Commit

Permalink
Make compatible with elasticsearch 2.x
Browse files Browse the repository at this point in the history
Elasticsearch 2.0 doesn't supports field names with the '.' character,
but both timers and histograms have the "Percentile 99.9%" field.

Fixes etishor/Metrics.NET#113
  • Loading branch information
Stiek committed Mar 8, 2016
1 parent 4022406 commit 1bd881f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Metrics/ElasticSearch/ElasticSearchReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected override void ReportHistogram(string name, HistogramValue value, Unit
new JsonProperty("Percentile 95%",value.Percentile95),
new JsonProperty("Percentile 98%",value.Percentile98),
new JsonProperty("Percentile 99%",value.Percentile99),
new JsonProperty("Percentile 99.9%" ,value.Percentile999),
new JsonProperty("Percentile 99_9%" ,value.Percentile999),
new JsonProperty("Sample Size", value.SampleSize)
});
}
Expand All @@ -155,7 +155,7 @@ protected override void ReportTimer(string name, TimerValue value, Unit unit, Ti
new JsonProperty("Percentile 95%",value.Histogram.Percentile95),
new JsonProperty("Percentile 98%",value.Histogram.Percentile98),
new JsonProperty("Percentile 99%",value.Histogram.Percentile99),
new JsonProperty("Percentile 99.9%" ,value.Histogram.Percentile999),
new JsonProperty("Percentile 99_9%" ,value.Histogram.Percentile999),
new JsonProperty("Sample Size", value.Histogram.SampleSize)
});
}
Expand Down

0 comments on commit 1bd881f

Please sign in to comment.