Skip to content

Commit

Permalink
fix(metrics): use same metric name but different tags for postgres op…
Browse files Browse the repository at this point in the history
…erations (#10)
  • Loading branch information
chgl committed Jul 25, 2021
1 parent f7861bc commit 8bd4fdb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
@Component
public class PostgresFhirResourceRepository implements FhirResourceRepository {
private static final Timer INSERT_DURATION_TIMER =
Timer.builder("fhirgateway.postgres.store.duration.seconds")
Timer.builder("fhirgateway.postgres.operation.duration.seconds")
.description("Time taken to store all resources from a FHIR bundle in the database")
.minimumExpectedValue(Duration.ofMillis(1))
.maximumExpectedValue(Duration.ofSeconds(5))
.publishPercentileHistogram()
.tags("operation", "insert")
.register(Metrics.globalRegistry);
private static final Timer DELETE_DURATION_TIMER =
Timer.builder("fhirgateway.postgres.delete.duration.seconds")
Timer.builder("fhirgateway.postgres.operation.duration.seconds")
.description("Time taken to delete all resources from a FHIR bundle from the database")
.minimumExpectedValue(Duration.ofMillis(1))
.maximumExpectedValue(Duration.ofSeconds(5))
Expand Down

0 comments on commit 8bd4fdb

Please sign in to comment.