apache/druid · warning

Deprecated Monitor class name

Error message

Deprecated Monitor class name[%s] found, please use name[%s] instead.

What it means

MonitorsConfig resolves monitor class names from configuration into Monitor classes via Class.forName. Legacy package names (com.metamx.*, io.druid.*) are rewritten to org.apache.druid.* and a warning is logged when a deprecated name is used. Configuration still works, but users should migrate to the current package names.

Solutions

  1. Replace com.metamx.* and io.druid.* monitor class names with org.apache.druid.* equivalents in configuration.
  2. Review druid.monitoring.monitors in runtime.properties/common config and update.
  3. Verify the fully qualified monitor class exists in the current Druid version.

Example fix

// before
druid.monitoring.monitors=["io.druid.server.metrics.EventReceiverFirehoseMonitor"]
// after
druid.monitoring.monitors=["org.apache.druid.server.metrics.EventReceiverFirehoseMonitor"]
Defensive patterns

Strategy: validation

Validate before calling

// config sanity check before apply
String name = monitorName.replace("io.druid.", "org.apache.druid.").replace("com.metamx.", "org.apache.druid.");
Class.forName(name); // must resolve without warning

Prevention

When it happens

Trigger: druid.monitoring.monitors configuration contains a monitor class name with the old com.metamx or io.druid package prefix.

Common situations: Upgrading from pre-0.12 Druid (metamx) or pre-rename (io.druid) versions without updating runtime.properties; copy-pasted legacy configs.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/a1797514f7f77644. Report an issue: GitHub.

Appendix: source

Thrown at server/src/main/java/org/apache/druid/server/metrics/MonitorsConfig.java:91

           "monitors=" + monitors +
           '}';
  }

  private static List<Class<? extends Monitor>> getMonitorsFromNames(List<String> monitorNames)
  {
    List<Class<? extends Monitor>> monitors = new ArrayList<>();
    if (monitorNames == null) {
      return monitors;
    }
    try {
      for (String monitorName : monitorNames) {
        final String effectiveMonitorName = StringUtils.replace(
            StringUtils.replace(monitorName, METAMX_PACKAGE, APACHE_DRUID_PACKAGE_NAME),
            IO_DRUID_PACKAGE,
            APACHE_DRUID_PACKAGE_NAME
        );
        if (!effectiveMonitorName.equals(monitorName)) {
          log.warn(
              "Deprecated Monitor class name[%s] found, please use name[%s] instead.",
              monitorName,
              effectiveMonitorName
          );
        }
        Class<? extends Monitor> monitorClass = (Class<? extends Monitor>) Class.forName(effectiveMonitorName);
        monitors.add(monitorClass);
      }
      return monitors;
    }
    catch (ClassNotFoundException cnfe) {
      throw new RuntimeException(cnfe);
    }
  }
}

View on GitHub (pinned to 9b90983fd2)