Releases: grafana/xk6-client-prometheus-remote
v0.4.0
xk6-client-prometheus-remote v0.4.0 is here!
This release brings significant improvements to code quality, security, developer experience, and bug fixes. The codebase has been modernized, tooling enhanced, and important compatibility issues addressed.
New Features
TypeScript API Declarations (#48)
Added comprehensive TypeScript type definitions (index.d.ts) providing:
- Full IDE autocomplete support for all APIs
- Type safety and compile-time error checking
- Inline documentation with practical examples
- Better developer experience in VS Code, WebStorm, and other modern editors
Developer Tooling (#57)
Added a comprehensive development environment with:
- Makefile: Common development tasks (build, test, lint, security checks, documentation generation)
- CONTRIBUTING.md: Complete contribution guidelines covering:
- Code of conduct
- Bug reporting and feature requests
- Development workflow
- Testing and quality standards
- Task documentation
Comprehensive Smoke Test (#51)
Added a runtime verification test that ensures:
- All Go exports match TypeScript definitions
- API surface correctness across language boundaries
- Prevention of export regressions
- Documentation of expected behavior through executable tests
Improvements
Code Quality Enhancements (#50)
Implemented comprehensive linting with golangci-lint (40+ linters enabled):
- Added package and function documentation for all exports
- Reorganized code with proper function ordering (exported before unexported)
- Modernized codebase using Go 1.22+ features (integer range loops, automatic loop variable capture)
- Improved test infrastructure with parallel test execution
- Enhanced error handling and context propagation
- Fixed whitespace, formatting, and style consistency issues
- Pre-allocated slices for better performance
- Used standard library constants for improved maintainability
k6 v1.4.0 Support (#53)
Updated to the latest k6 version, ensuring compatibility with the newest k6 features and improvements.
Modernized Release Workflow (#55)
Replaced custom release workflow with the shared workflow from grafana/xk6, bringing:
- Consistency with other k6 extensions
- Streamlined release process
- Better maintainability
Breaking Change: Docker images will no longer be created with k6 binary built with this extension. Users should use k6's Automatic Extension Resolution feature or build with xk6 locally if needed.
Security
Vulnerability Fixes (#59)
Updated golang.org/x/crypto from v0.43.0 to v0.45.0, addressing:
- GO-2025-4135: Malformed constraint causing denial of service in
golang.org/x/crypto/ssh/agent - GO-2025-4134: Unbounded memory consumption in
golang.org/x/crypto/ssh
Bug Fixes
Label Ordering Compliance (#60)
Fixed label ordering in example scripts to comply with Prometheus/Thanos requirements:
- Labels are now sorted alphabetically (lexicographic order after
__name__) - Prevents 409 Conflict errors from Thanos
- Updated examples:
examples/full_write_example.jsexamples/full_read_write_example.jsexamples/benchtool.js
Documentation
- Added comprehensive TypeScript API documentation
- Created contribution guidelines
- Updated development workflow documentation
- Added inline code examples throughout type definitions
For the complete list of changes, see the full changelog.
v0.3.2
What's Changed
- Report remote write success on any 2xx response by @philipgough in #31
- Transfer code ownership to k6-extensions by @andrewslotin in #33
- Change to using sobek instead of goja by @mstoykov in #34
New Contributors
- @andrewslotin made their first contribution in #33
Full Changelog: v0.3.1...v0.3.2
v0.3.1
v0.3.0
What's Changed
- feat: update k6 dependency and go version by @fgouteroux in #28
New Contributors
- @fgouteroux made their first contribution in #28
Full Changelog: v0.2.4...v0.3.0
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.2.0
Remove generateFromTimeSeries and cleanup after that This does have some performance improvements due to having to not support some cases. name old time/op new time/op delta CompileTemplatesSimple-8 1.05µs ±10% 0.98µs ±10% -5.92% (p=0.015 n=10+10) CompileTemplatesComplex-8 1.54µs ± 7% 1.41µs ± 6% -8.35% (p=0.001 n=9+10) EvaluateTemplatesSimple-8 230ns ± 7% 25ns ± 8% -89.30% (p=0.000 n=10+10) EvaluateTemplatesComplex-8 6.88ns ± 6% 6.98ns ±10% ~ (p=0.796 n=10+10) StoreFromPrecompiledTemplates-8 155ms ±13% 153ms ± 7% ~ (p=1.000 n=10+10) StoreFromTemplates-8 153ms ± 7% 158ms ±10% ~ (p=0.243 n=10+9) GenerateFromPrecompiledTemplates-8 31.6ms ±19% 27.4ms ±20% -13.42% (p=0.005 n=10+10) WriteFor-8 1.08µs ±10% 1.05µs ±11% ~ (p=0.280 n=10+10) name old alloc/op new alloc/op delta StoreFromPrecompiledTemplates-8 117MB ± 0% 117MB ± 0% ~ (p=1.000 n=10+9) StoreFromTemplates-8 117MB ± 0% 117MB ± 0% ~ (p=0.143 n=10+10) GenerateFromPrecompiledTemplates-8 79.2MB ± 0% 79.2MB ± 0% -0.00% (p=0.000 n=10+9) WriteFor-8 640B ± 5% 739B ±43% ~ (p=0.795 n=7+10) name old allocs/op new allocs/op delta StoreFromPrecompiledTemplates-8 175 ± 2% 175 ± 1% ~ (p=0.643 n=10+10) StoreFromTemplates-8 309 ± 1% 281 ± 1% -9.22% (p=0.000 n=10+10) GenerateFromPrecompiledTemplates-8 39.0 ±21% 28.3 ±13% -27.44% (p=0.000 n=10+10) WriteFor-8 0.00 0.00 ~ (all equal)