/** * Add tags * @param tags additional {@link org.apache.gobblin.metrics.Tag}s for the reporter. * @return {@code this} */ public T withTags(Map<String, String> tags) { this.tags.putAll(tags); return self(); }
/** * Add tag. * @param key tag key * @param value tag value * @return {@code this} */ public T withTag(String key, String value) { this.tags.put(key, value); return self(); }
/** * Add tags. * @param tags List of {@link org.apache.gobblin.metrics.Tag} * @return {@code this} */ public T withTags(List<Tag<?>> tags) { for(Tag<?> tag : tags) { this.tags.put(tag.getKey(), tag.getValue().toString()); } return self(); }
/** * Add the name of the base metrics context as prefix to the metric keys * * @param metricContextName name of the metrics context * @return {@code this} */ public T withMetricContextName(String metricContextName) { this.metricContextName = metricContextName; return self(); }
/** * Sets metrics prefix independent from the context (useful for grouping metrics in Graphite or other metric-store) * @param metricsPrefix * @return */ public T withMetricsPrefix(String metricsPrefix) { this.metricsPrefix = metricsPrefix; return self(); }
/** * Add tag. * @param key tag key * @param value tag value * @return {@code this} */ public T withTag(String key, String value) { this.tags.put(key, value); return self(); }
/** * Add tags. * @param tags List of {@link org.apache.gobblin.metrics.Tag} * @return {@code this} */ public T withTags(List<Tag<?>> tags) { for(Tag<?> tag : tags) { this.tags.put(tag.getKey(), tag.getValue().toString()); } return self(); }
/** * Set the name of the reporter * * @param name name of the metric reporter * @return {@code this} */ public T name(String name) { this.name = name; return self(); }
/** * Add tags * @param tags additional {@link org.apache.gobblin.metrics.Tag}s for the reporter. * @return {@code this} */ public T withTags(Map<String, String> tags) { this.tags.putAll(tags); return self(); }
/** * Convert durations to the given time unit. * * @param durationUnit a unit of time * @return {@code this} */ public T convertDurationsTo(TimeUnit durationUnit) { this.durationUnit = durationUnit; return self(); }
/** * Convert rates to the given time unit. * * @param rateUnit a unit of time * @return {@code this} */ public T convertRatesTo(TimeUnit rateUnit) { this.rateUnit = rateUnit; return self(); }
/** * Convert durations to the given time unit. * * @param durationUnit a unit of time * @return {@code this} */ public T convertDurationsTo(TimeUnit durationUnit) { this.durationUnit = durationUnit; return self(); }
/** * Set the name of the reporter * * @param name name of the metric reporter * @return {@code this} */ public T name(String name) { this.name = name; return self(); }
/** * Add the name of the base metrics context as prefix to the metric keys * * @param metricContextName name of the metrics context * @return {@code this} */ public T withMetricContextName(String metricContextName) { this.metricContextName = metricContextName; return self(); }
/** * Sets metrics prefix independent from the context (useful for grouping metrics in Graphite or other metric-store) * @param metricsPrefix * @return */ public T withMetricsPrefix(String metricsPrefix) { this.metricsPrefix = metricsPrefix; return self(); }
/** * Convert rates to the given time unit. * * @param rateUnit a unit of time * @return {@code this} */ public T convertRatesTo(TimeUnit rateUnit) { this.rateUnit = rateUnit; return self(); }