{"record":{"id":"8c472cfac791b33e","repo":"apache/druid","slug":"unknown-type-of-emitter-please-set-s-s-or","errorCode":null,"errorMessage":"Unknown type of emitter. Please set [%s], [%s] or provide registered subtype of org.apache.druid.java.util.emitter.core.factory.EmitterFactory via [%s]","messagePattern":"Unknown type of emitter\\. Please set \\[(.+?)\\], \\[(.+?)\\] or provide registered subtype of org\\.apache\\.druid\\.java\\.util\\.emitter\\.core\\.factory\\.EmitterFactory via \\[(.+?)\\]","errorType":"exception","errorClass":"ISE","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/java/util/emitter/core/Emitters.java","lineNumber":63,"sourceCode":"\n  public static Emitter create(\n      Properties props,\n      AsyncHttpClient httpClient,\n      ObjectMapper jsonMapper,\n      Lifecycle lifecycle\n  )\n  {\n    Map<String, Object> jsonified;\n    if (props.getProperty(LOG_EMITTER_PROP) != null) {\n      jsonified = makeLoggingMap(props);\n      jsonified.put(\"type\", \"logging\");\n    } else if (props.getProperty(HTTP_EMITTER_PROP) != null) {\n      jsonified = makeHttpMap(props);\n      jsonified.put(\"type\", \"http\");\n    } else if (props.getProperty(CUSTOM_EMITTER_TYPE_PROP) != null) {\n      jsonified = makeCustomFactoryMap(props);\n    } else {\n      throw new ISE(\n          \"Unknown type of emitter. Please set [%s], [%s] or provide registered subtype of org.apache.druid.java.util.emitter.core.factory.EmitterFactory via [%s]\",\n          LOG_EMITTER_PROP,\n          HTTP_EMITTER_PROP,\n          CUSTOM_EMITTER_TYPE_PROP\n      );\n    }\n    return jsonMapper.convertValue(jsonified, EmitterFactory.class).makeEmitter(jsonMapper, httpClient, lifecycle);\n  }\n\n  // Package-visible for unit tests\n\n  static Map<String, Object> makeHttpMap(Properties props)\n  {\n    Map<String, Object> httpMap = new HashMap<>();\n\n    final String urlProperty = \"org.apache.druid.java.util.emitter.http.url\";\n\n    final String baseUrl = props.getProperty(urlProperty);","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/java/util/emitter/core/Emitters.java#L45-L81","documentation":"Emitters.create() builds an emitter from configuration properties by detecting the emitter type. If none of the recognized properties (log emitter, http emitter, or custom EmitterFactory type) is present, it throws IllegalStateException telling the user which properties to set. Druid cannot determine what kind of emitter to instantiate.","triggerScenarios":"Calling Emitters.create(Properties) when neither org.apache.druid.java.util.emitter.logging.logLevel, org.apache.druid.java.util.emitter.http.url, nor org.apache.druid.java.util.emitter.type (custom emitter type) is configured.","commonSituations":"Missing or misnamed emitter properties in runtime.properties; config file not loaded so properties are empty; upgrading Druid where the old type property name changed; typo in property key.","solutions":["Set org.apache.druid.java.util.emitter.http.url for an HTTP emitter, e.g. http://recipient:8080/druid/metrics","Or set org.apache.druid.java.util.emitter.logging.logLevel (e.g. \"info\") for a logging emitter","Or configure org.apache.druid.java.util.emitter.type with a registered EmitterFactory subtype","Verify the properties file is actually on the classpath and loaded into the Properties object"],"exampleFix":"// before (runtime.properties)\n# no emitter config\n// after\norg.apache.druid.java.util.emitter.http.url=http://metrics-host:8080/druid/metrics","handlingStrategy":"validation","validationCode":"Properties props = ...;\nboolean hasEmitter = props.getProperty(\"org.apache.druid.java.util.emitter.logging.logLevel\") != null\n  || props.getProperty(\"org.apache.druid.java.util.emitter.http.url\") != null\n  || props.getProperty(\"org.apache.druid.java.util.emitter.type\") != null;\nif (!hasEmitter) {\n  throw new IllegalStateException(\"No emitter configured: set http url, logging level, or custom type\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  Emitter e = Emitters.create(props);\n} catch (IllegalStateException ex) {\n  log.error(ex, \"Emitter configuration missing\");\n  throw ex;\n}","preventionTips":["Always set at least one emitter property (http url, logging logLevel, or custom type)","Copy property keys exactly; they are long and easy to mistype","Verify runtime.properties is loaded into the Properties object passed to create","Add a config smoke test that constructs the emitter at startup"],"tags":["configuration","emitter","druid"],"backgroundTag":"missing-required-config","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}