{"record":{"id":"b9081daf613d85b4","repo":"grafana/k6","slug":"couldn-t-make-point-from-sample-w","errorCode":null,"errorMessage":"couldn't make point from sample: %w","messagePattern":"couldn't make point from sample: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/output/influxdb/output.go","lineNumber":145,"sourceCode":"\t\t\tvalues := make(map[string]any)\n\t\t\tif cached, ok := cache[sample.Tags]; ok {\n\t\t\t\ttags = cached.tags\n\t\t\t\tmaps.Copy(values, cached.values)\n\t\t\t} else {\n\t\t\t\ttags = sample.Tags.Map()\n\t\t\t\to.extractTagsToValues(tags, values)\n\t\t\t\tcache[sample.Tags] = cacheItem{tags, values}\n\t\t\t}\n\t\t\tvalues[\"value\"] = sample.Value\n\t\t\tvar p *client.Point\n\t\t\tp, err = client.NewPoint(\n\t\t\t\tsample.Metric.Name,\n\t\t\t\ttags,\n\t\t\t\tvalues,\n\t\t\t\tsample.Time,\n\t\t\t)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"couldn't make point from sample: %w\", err)\n\t\t\t}\n\t\t\tbatch.AddPoint(p)\n\t\t}\n\t}\n\n\treturn batch, nil\n}\n\n// Description returns a human-readable description of the output.\nfunc (o *Output) Description() string {\n\treturn fmt.Sprintf(\"InfluxDBv1 (%s)\", o.Config.Addr.String)\n}\n\n// Start tries to open the specified JSON file and starts the goroutine for\n// metric flushing. If gzip encoding is specified, it also handles that.\nfunc (o *Output) Start() error {\n\to.logger.Debug(\"Starting...\")\n\t// Try to create the database if it doesn't exist. Failure to do so is USUALLY harmless; it","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/output/influxdb/output.go#L127-L163","documentation":"While converting a metric sample into an InfluxDB point, client.NewPoint rejected the combination of metric name, tags and field values (e.g. unsupported field type from tag-to-value extraction such as a bool mixed into numeric fields). batchFromSamples wraps that failure for the offending sample.","triggerScenarios":"Thrown at internal/output/influxdb/output.go:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for which field/tag caused it","Check K6_INFLUXDB_TAGS_AS_FIELDS typing: the same tag must not be mapped to conflicting types (e.g. bool and float)","Fix duplicate or inconsistent tag types across samples"],"exampleFix":null,"handlingStrategy":"fallback","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"}