{"record":{"id":"c9c4453ccabbe6cc","repo":"grafana/k6","slug":"failed-to-create-opentelemetry-resource-w","errorCode":null,"errorMessage":"failed to create OpenTelemetry resource: %w","messagePattern":"failed to create OpenTelemetry resource: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/output/opentelemetry/output.go","lineNumber":86,"sourceCode":"\treturn o.StopWithTestError(nil)\n}\n\n// Start performs initialization tasks prior to Engine using the output\nfunc (o *Output) Start() error {\n\to.logger.Debug(\"Starting output...\")\n\n\texp, err := getExporter(o.config)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to create OpenTelemetry exporter: %w\", err)\n\t}\n\n\tres, err := resource.Merge(resource.Default(),\n\t\tresource.NewSchemaless(\n\t\t\tsemconv.ServiceName(o.config.ServiceName.String),\n\t\t\tsemconv.ServiceVersion(o.config.ServiceVersion.String),\n\t\t))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to create OpenTelemetry resource: %w\", err)\n\t}\n\n\tmeterProvider := metric.NewMeterProvider(\n\t\tmetric.WithResource(res),\n\t\tmetric.WithReader(\n\t\t\tmetric.NewPeriodicReader(\n\t\t\t\texp,\n\t\t\t\tmetric.WithInterval(o.config.ExportInterval.TimeDuration()),\n\t\t\t),\n\t\t),\n\t)\n\n\tpf, err := output.NewPeriodicFlusher(o.config.FlushInterval.TimeDuration(), o.flushMetrics)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\to.logger.Debug(\"Started!\")","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/output/opentelemetry/output.go#L68-L104","documentation":"Output.Start failed while merging the default OpenTelemetry resource with the service name/version attributes. resource.Merge errors when attribute schemas conflict; this wrapper reports the resource-construction step.","triggerScenarios":"Thrown at internal/output/opentelemetry/output.go:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for the conflicting attribute","Ensure K6_OTEL_SERVICE_NAME and K6_OTEL_SERVICE_VERSION are plain, distinct strings"],"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"}