{"record":{"id":"ed73bd66fc135182","repo":"pinpoint-apm/pinpoint","slug":"metric-binding-error-header-hostgroupname-erro","errorCode":null,"errorMessage":"metric binding error. header=hostGroupName:{} errorCount:{} {}","messagePattern":"metric binding error\\. header=hostGroupName:(.+?) errorCount:(.+?) (.+?)","errorType":"validation","errorClass":"BindException","httpStatus":400,"severity":"error","filePath":"metric-module/metric/src/main/java/com/navercorp/pinpoint/metric/collector/controller/TelegrafMetricController.java","lineNumber":84,"sourceCode":"    public TelegrafMetricController(SystemMetricService systemMetricService,\n                                    SystemMetricDataTypeService systemMetricMetadataService,\n                                    SystemMetricTagService systemMetricTagService,\n                                    TenantProvider tenantProvider) {\n        this.systemMetricService = Objects.requireNonNull(systemMetricService, \"systemMetricService\");\n        this.systemMetricMetadataService = Objects.requireNonNull(systemMetricMetadataService, \"systemMetricMetadataService\");\n        this.systemMetricTagService = Objects.requireNonNull(systemMetricTagService, \"systemMetricTagService\");\n        this.tenantProvider = Objects.requireNonNull(tenantProvider, \"tenantProvider\");\n    }\n\n\n    @PostMapping(value = \"/telegraf\")\n    public ResponseEntity<String> saveSystemMetric(\n            @RequestHeader(value = \"hostGroupName\") String hostGroupName,\n            @RequestBody TelegrafMetrics telegrafMetrics, BindingResult bindingResult\n    ) throws BindException {\n        if (bindingResult.hasErrors()) {\n            SimpleErrorMessage simpleErrorMessage = new SimpleErrorMessage(bindingResult);\n            logger.warn(\"metric binding error. header=hostGroupName:{} errorCount:{} {}\", hostGroupName, bindingResult.getErrorCount(), simpleErrorMessage);\n            throw new BindException(bindingResult);\n        }\n\n        if (!isValidGroupName(hostGroupName)) {\n            logger.warn(\"invalid hostGroupName='{}'\", hostGroupName);\n            return ResponseEntity.badRequest().body(\"invalid hostGroupName='\" + hostGroupName + \"'\");\n        }\n\n        String hostName = getHost(telegrafMetrics);\n        if (StringUtils.isEmpty(hostName)) {\n            // hostname null check\n            logger.info(\"hostName is empty. hostGroupName={}\", hostGroupName);\n            return ResponseEntity.badRequest().body(\"hostName is empty\");\n        }\n\n        if (!isValidHostName(hostName)) {\n            logger.warn(\"invalid hostName='{}', hostGroupName='{}'\", hostName, hostGroupName);\n        }","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/metric-module/metric/src/main/java/com/navercorp/pinpoint/metric/collector/controller/TelegrafMetricController.java#L66-L102","documentation":"Warn log in TelegrafMetricController.saveSystemMetric: binding incoming Telegraf metric messages to metric definitions failed for some items; the message records the hostGroupName and errorCount plus details so partial ingestion loss can be traced.","triggerScenarios":"Thrown at metric-module/metric/src/main/java/com/navercorp/pinpoint/metric/collector/controller/TelegrafMetricController.java:84 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that telegraf metric/field names match configured metric definitions","Verify tenant/hostGroupName registration before ingestion","Log and skip invalid samples while returning a summary so senders can fix labels"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}