use of org.apache.jena.fuseki.server.CounterName in project jena by apache.
the class FusekiRequestsMetrics method bindTo.
@Override
public void bindTo(MeterRegistry registry) {
DataService dataService = dataAccessPoint.getDataService();
for (Operation operation : dataService.getOperations()) {
List<Endpoint> endpoints = dataService.getEndpoints(operation);
for (Endpoint endpoint : endpoints) {
CounterSet counters = endpoint.getCounters();
for (CounterName counterName : counters.counters()) {
Counter counter = counters.get(counterName);
Gauge.builder("fuseki_" + counterName.getFullName(), counter, Counter::value).tags(new String[] { "dataset", dataAccessPoint.getName(), "endpoint", endpoint.getName(), "operation", operation.getName(), "description", operation.getDescription() }).register(registry);
}
}
}
}
Aggregations