Skip to content

Commit

Permalink
Include timestamp information in metrics (#285)
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
  • Loading branch information
tomkerkhove committed Jan 24, 2019
1 parent 952d825 commit f500ba8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Promitor.Core.Scraping/Promitor.Core.Scraping.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PackageReference Include="Guard.Net" Version="1.2.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.8.1" />
<PackageReference Include="Microsoft.Azure.Management.Fluent" Version="1.19.0" />
<PackageReference Include="Prometheus.Client" Version="2.0.0" />
<PackageReference Include="Prometheus.Client" Version="2.1.0" />
<PackageReference Include="YamlDotNet" Version="5.3.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Promitor.Core.Scraping/Scraper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public async Task ScrapeAsync(MetricDefinition metricDefinition)

_logger.LogInformation("Found value '{MetricValue}' for metric '{MetricName}' with aggregation interval '{AggregationInterval}'", foundMetricValue, metricDefinition.Name, aggregationInterval);

var gauge = Metrics.CreateGauge(metricDefinition.Name, metricDefinition.Description);
var gauge = Metrics.CreateGauge(metricDefinition.Name, metricDefinition.Description, includeTimestamp: true);
gauge.Set(foundMetricValue);
}
catch (Exception exception)
Expand Down

0 comments on commit f500ba8

Please sign in to comment.