Closed Srinirap closed 1 year ago
I think you're facing https://github.com/grafana/xk6/issues/52 issue
Can you try explicating the v0.41.0, please?
xk6 build v0.41.0 --with github.com/grafana/xk6-output-prometheus-remote
@codebien Still getting the same error,
xk6 build v0.41.0 --with github.com/grafana/xk6-output-prometheus-remote
2022/11/10 01:26:10 [INFO] Temporary folder: /Users/srinivasan/workspace/dcms-loadtest-scripts/buildenv_2022-11-10-0126.102888145
2022/11/10 01:26:10 [INFO] Initializing Go module
2022/11/10 01:26:10 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init k6
go: creating new go.mod: module k6
2022/11/10 01:26:11 [INFO] Pinning versions
2022/11/10 01:26:11 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod edit -require github.com/grafana/xk6-output-prometheus-remote@latest
2022/11/10 01:26:11 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17
2022/11/10 01:26:12 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17
2022/11/10 01:26:12 [INFO] Writing main module: /Users/srinivasan/workspace/dcms-loadtest-scripts/buildenv_2022-11-10-0126.102888145/main.go
2022/11/10 01:26:12 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod edit -require go.k6.io/k6@v0.41.0
2022/11/10 01:26:12 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17
go: downloading golang.org/x/term v0.0.0-20220919170432-7a66f970e087
go: downloading github.com/mstoykov/atlas v0.0.0-20220808085829-90340e9998bd
go: downloading github.com/dop251/goja v0.0.0-20221003171542-5ea1285e6c91
go: downloading github.com/klauspost/compress v1.15.11
go: downloading golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be
go: downloading golang.org/x/time v0.0.0-20220922220347-f3bd1da661af
go: downloading golang.org/x/net v0.0.0-20221002022538-bcab6841153b
go: downloading golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec
2022/11/10 01:26:23 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17
2022/11/10 01:26:24 [INFO] Build environment ready
2022/11/10 01:26:24 [INFO] Building k6
2022/11/10 01:26:24 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17
2022/11/10 01:26:24 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /Users/srinivasan/workspace/dcms-loadtest-scripts/k6 -ldflags -w -s -trimpath
# github.com/grafana/xk6-output-prometheus-remote/pkg/remotewrite
../../../go/pkg/mod/github.com/grafana/xk6-output-prometheus-remote@v0.0.4/pkg/remotewrite/remotewrite.go:286:18: undefined: metrics.SampleTags
../../../go/pkg/mod/github.com/grafana/xk6-output-prometheus-remote@v0.0.4/pkg/remotewrite/remotewrite.go:291:59: undefined: metrics.SampleTags
../../../go/pkg/mod/github.com/grafana/xk6-output-prometheus-remote@v0.0.4/pkg/remotewrite/prometheus.go:12:27: undefined: metrics.SampleTags
2022/11/10 01:26:40 [INFO] Cleaning up temporary folder: /Users/srinivasan/workspace/dcms-loadtest-scripts/buildenv_2022-11-10-0126.102888145
2022/11/10 01:26:40 [FATAL] exit status 2
Hi @Srinirap, my mistake, the version you have to use is v0.40.0 so the following is the correct command:
xk6 build v0.40.0 --with github.com/grafana/xk6-output-prometheus-remote
In the next hours, I'm going to release a working version with the new v0.41.0
Thanks @codebien! I faced the same issue and building with v0.40.0 worked!
Just released a new version for k6 v0.41.0
, let us know if something is not working as expected.
@codebien v0.41.0 is working for me, Thank you so much 🙂.
go version go1.19.1
https://github.com/grafana/xk6-output-prometheus-remote/issues/56#tasklist-block-126fe2cb-28b5-419d-9932-b1bc01f6211b