/** * Copy constructor * * @param other The other {@link DropwizardMetricsOptions} to copy when creating this */ public DropwizardMetricsOptions(DropwizardMetricsOptions other) { super(other); registryName = other.getRegistryName(); jmxEnabled = other.isJmxEnabled(); jmxDomain = other.getJmxDomain(); configPath = other.getConfigPath(); monitoredEventBusHandlers = new ArrayList<>(other.monitoredEventBusHandlers); monitoredHttpServerUris = new ArrayList<>(other.monitoredHttpServerUris); monitoredHttpClientUris = new ArrayList<>(other.monitoredHttpClientUris); monitoredHttpClientEndpoints = new ArrayList<>(other.monitoredHttpClientEndpoints); metricRegistry = other.getMetricRegistry(); }
public static void toJson(DropwizardMetricsOptions obj, java.util.Map<String, Object> json) { if (obj.getBaseName() != null) { json.put("baseName", obj.getBaseName()); } if (obj.getConfigPath() != null) { json.put("configPath", obj.getConfigPath()); } json.put("enabled", obj.isEnabled()); if (obj.getJmxDomain() != null) { json.put("jmxDomain", obj.getJmxDomain()); } json.put("jmxEnabled", obj.isJmxEnabled()); if (obj.getRegistryName() != null) { json.put("registryName", obj.getRegistryName()); } } }
if (metricsOptions.getConfigPath() != null && !metricsOptions.getConfigPath().isEmpty()) { FileResolver resolver = new FileResolver(); JsonObject loadedFromFile; try { loadedFromFile = loadOptionsFile(metricsOptions.getConfigPath(), resolver); } finally { try {