/** * Set a named dimension to an integer value. * * @param dimensionName the name of the dimension to set * @param dimensionValue to value for the given dimension * @return this, to facilitate chaining */ public PointBuilder set(String dimensionName, long dimensionValue) { return set(dimensionName, Value.of(dimensionValue)); }
/** * Set a named dimension to a string value. * * @param dimensionName the name of the dimension to set * @param dimensionValue to value for the given dimension * @return this, to facilitate chaining */ public PointBuilder set(String dimensionName, String dimensionValue) { return set(dimensionName, Value.of(dimensionValue)); }
/** * Set a named dimension to a floating point value. * * @param dimensionName the name of the dimension to set * @param dimensionValue to value for the given dimension * @return this, to facilitate chaining */ public PointBuilder set(String dimensionName, double dimensionValue) { return set(dimensionName, Value.of(dimensionValue)); }
/** utility method for testing */ public Point point(String dim, String val) { return pointBuilder().set(dim, val).build(); } }
private Point createContext(String dimensionName, String dimensionValue) { return overQuotaCounter.builder().set(dimensionName, dimensionValue).build(); }
@Override public Result search(Query query, Execution execution) { Point dims = latencyGauge.builder() .set("chain", execution.chain().getId().stringValue()) .build(); latencyGauge.sample(query.getDurationTime(), dims); return execution.search(query); }