{"record":{"id":"1bdf6e14f2488e3b","repo":"grafana/k6","slug":"an-invalid-type-s-is-specified-for-an-influxdb","errorCode":null,"errorMessage":"an invalid type (%s) is specified for an InfluxDB field (%s)","messagePattern":"an invalid type \\((.+?)\\) is specified for an InfluxDB field \\((.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/output/influxdb/util.go","lineNumber":86,"sourceCode":"\t\t\tfieldType = \"string\"\n\t\t}\n\n\t\terr := checkDuplicatedTypeDefinitions(fieldKinds, fieldName)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tswitch fieldType {\n\t\tcase \"string\":\n\t\t\tfieldKinds[fieldName] = String\n\t\tcase \"bool\":\n\t\t\tfieldKinds[fieldName] = Bool\n\t\tcase \"float\":\n\t\t\tfieldKinds[fieldName] = Float\n\t\tcase \"int\":\n\t\t\tfieldKinds[fieldName] = Int\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"an invalid type (%s) is specified for an InfluxDB field (%s)\",\n\t\t\t\tfieldType, fieldName)\n\t\t}\n\t}\n\n\treturn fieldKinds, nil\n}\n","sourceCodeStart":68,"sourceCodeEnd":93,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/output/influxdb/util.go#L68-L93","documentation":"A tag listed in K6_INFLUXDB_TAGS_AS_FIELDS was given a type suffix that is not one of string, bool, float or int. MakeFieldKinds switches on the declared field type and falls through to this error for the named field.","triggerScenarios":"Thrown at internal/output/influxdb/util.go:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the supported types: string, bool, float or int","Example: K6_INFLUXDB_TAGS_AS_FIELDS=check_name:string,check_duration:float"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}