{"record":{"id":"c01a6af7367d0a6b","repo":"grafana/k6","slug":"k6-experimental-tracing-has-been-removed-all-of-i","errorCode":null,"errorMessage":"k6/experimental/tracing has been removed. All of it functionality is available as pure JavaScript module. More info available at the docs: https://grafana.com/docs/k6/latest/javascript-api/jslib/http-instrumentation-tempo","messagePattern":"k6/experimental/tracing has been removed\\. All of it functionality is available as pure JavaScript module\\. More info available at the docs: https://grafana\\.com/docs/k6/latest/javascript-api/jslib/http-instrumentation-tempo","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/jsmodules.go","lineNumber":107,"sourceCode":"\n\t// external is always prefixed with `k6/x`\n\tfor _, e := range external {\n\t\tresult[e.Name] = e.Module\n\t}\n\n\treturn result\n}\n\ntype removedModule struct {\n\terrMsg string\n}\n\nfunc newRemovedModule(errMsg string) modules.Module {\n\treturn &removedModule{errMsg: errMsg}\n}\n\nfunc (rm *removedModule) NewModuleInstance(vu modules.VU) modules.Instance {\n\tcommon.Throw(vu.Runtime(), errors.New(rm.errMsg))\n\n\treturn nil\n}\n\ntype warnExperimentalModule struct {\n\tonce sync.Once\n\tmsg  string\n\tbase modules.Module\n}\n\nfunc newWarnExperimentalModule(base modules.Module, msg string) modules.Module {\n\treturn &warnExperimentalModule{\n\t\tmsg:  msg,\n\t\tbase: base,\n\t}\n}\n\nfunc (w *warnExperimentalModule) NewModuleInstance(vu modules.VU) modules.Instance {","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/jsmodules.go#L89-L125","documentation":"k6 no longer ships the k6/experimental/tracing module. The registry maps that import path to a stub module (newRemovedModule in internal/js/jsmodules.go:98-110) whose NewModuleInstance always throws via common.Throw, so any script that imports it fails during script initialization. The tracing instrumentation was moved out of the k6 binary into a pure-JavaScript jslib module (http-instrumentation-tempo).","triggerScenarios":"A script contains `import tracing from 'k6/experimental/tracing'` (or `import { instrumentHTTP } from 'k6/experimental/tracing'`) and runs on a k6 version where the module was removed. The error is thrown the moment the module is instantiated, before any code in the script body executes.","commonSituations":"Upgrading k6 (v0.5x to v1.x) while reusing old scripts or shared libraries that instrument HTTP with distributed-tracing headers for Grafana Tempo; CI jobs that pin old scripts against a newer k6 docker image; copying an example script from an outdated tutorial or forum post.","solutions":["Replace the import with the jslib module: `import { HTTPInstrumentation } from 'https://jslib.k6.io/http-instrumentation-tempo/1.0.1/index.js'` and instantiate `new HTTPInstrumentation(...)` instead of `tracing.instrumentHTTP(...)` (see https://grafana.com/docs/k6/latest/javascript-api/jslib/http-instrumentation-tempo)","If you do not use tracing, simply delete the import line","Pin your CI/CD to a k6 version that still bundles the module only as a temporary stopgap while you migrate"],"exampleFix":"// before\nimport tracing from 'k6/experimental/tracing';\ntracing.instrumentHTTP({ propagator: 'w3c' });\n\n// after\nimport { HTTPInstrumentation } from 'https://jslib.k6.com/http-instrumentation-tempo/1.0.1/index.js';\n// https://jslib.k6.io/http-instrumentation-tempo/1.0.1/index.js\nconst instrumentor = new HTTPInstrumentation({ propagator: 'w3c' });","handlingStrategy":"validation","validationCode":"# CI pre-flight: fail before k6 runs if a script imports a removed module\nif grep -rnE \"k6/experimental/(tracing|webcrypto|browser|grpc|timers|redis)\" scripts/; then\n  echo \"ERROR: script imports a k6 module that was removed; migrate it first\" >&2\n  exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin the k6 version in CI (docker image or binary) so upgrades are deliberate, not incidental","Read the k6 breaking-changes/migration notes before bumping major versions; v1.x removed several k6/experimental/* paths","Grep the codebase for 'k6/experimental/' imports as part of the upgrade checklist","Prefer jslib.k6.io modules over experimental built-ins for instrumentation — they decouple from the k6 binary version"],"tags":["k6","tracing","module-migration","breaking-change","import","tempo"],"backgroundTag":"removed-module-import","analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}