Skip to content

feat: add Prometheus Remote Write v2.0 support, tests, integration, and migration guide#10

Draft
ipe4647 wants to merge 2 commits into
huksley:mainfrom
ipe4647:feature/prom-remote-write-v2
Draft

feat: add Prometheus Remote Write v2.0 support, tests, integration, and migration guide#10
ipe4647 wants to merge 2 commits into
huksley:mainfrom
ipe4647:feature/prom-remote-write-v2

Conversation

@ipe4647
Copy link
Copy Markdown

@ipe4647 ipe4647 commented Nov 26, 2025

  • Implements full v2.0 protocol (symbol table, native histograms, metadata, exemplars)
  • Adds new API: pushTimeseriesV2, pushMetricsV2, serializeV2, etc.
  • Integration tests with local Prometheus via Docker Compose
  • Comprehensive documentation and migration guide
  • Backward compatible with v1.x API
  • Validated with unit and integration tests
  • See IMPLEMENTATION.md for full summary

NB! This all is vibe-coded. The source of the change is prometheus docs and the official proto type. Please be vigilant checking the implementation.

This should resolve #9

…nd migration guide

- Implements full v2.0 protocol (symbol table, native histograms, metadata, exemplars)
- Adds new API: pushTimeseriesV2, pushMetricsV2, serializeV2, etc.
- Integration tests with local Prometheus via Docker Compose
- Comprehensive documentation and migration guide
- Backward compatible with v1.x API
- Validated with unit and integration tests
- See IMPLEMENTATION.md for full summary
@huksley
Copy link
Copy Markdown
Owner

huksley commented Nov 26, 2025

lol) good start, but it is a bummer that it is just a bunch of _v2 files. it should be either separate project / npm library or fully integrated into the existing codebase (i.e. just change config = { version: 2 } or similar)

Vibe coding prompt:
Do not create bunch of _v2 files or method. Rewrite completely to integrate v2 protocol into existing codebase, allowing people using same methods to send metrics using the new protocol. Provide additional features using additional method, without v2 suffix everywhere.

- Deleted index_v2.js and index_v2.test.js files to remove v2 specific code.
- Updated package.json to remove test:v2 script.
- Modified test-integration.js to use unified API without v2 suffixes.
- Enhanced types.d.ts to support new unified API and removed v2 specific types.
- Added verification script to ensure refactoring completeness and correctness.
- Removed legacy types_v2.d.ts file.
- Ensured backward compatibility and auto-detection of protocol version.
@ipe4647
Copy link
Copy Markdown
Author

ipe4647 commented Nov 28, 2025

@huksley Some improvements were made. Please check it. I left the migration guides / implementation notes in for you to validate the AI thought process. IMHO they should be removed or re-written before merging to main.

@ipe4647 ipe4647 marked this pull request as draft November 28, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remote write v2 support

2 participants