feat: add cfetch and vmpush packages for converge integration #26
Draft
davidbirdsong wants to merge 2 commits into
Draft
Conversation
- make TTL semantics are consistent and the engine stays purely input-driven.
Author
|
This change is part of the following stack: Change managed by git-spice. |
b44f81a to
0953909
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two packages that bridge the converge engine to Cloudflare (input) and VictoriaMetrics (output), completing the data pipeline. Both are self-contained behind package boundaries with no dependency on root package globals.
cfetch/— Cloudflare FetcherImplements
converge.Fetcherby queryinghttpRequests1mGroupsover a time range.datetime_geq/datetime_lt, not the single-bucketdatetime:used by the existing scrape path)GQLClientinterface at construction, not a global. Root package wraps its*GraphQLin a thin adapter[]Zone(simple struct with ID/Name/Free) instead of importingcfzoneshttpRequests1mGroups)cfp_zone_*observations (gauge semantics, not counters)vmpush/— VictoriaMetrics SinkImplements
converge.Sinkusing Prometheus remote write protocol.prompb.WriteRequestSample.Key(e.g.cfp_zone_requests_total{zone="example.com"}) back into__name__+ label pairs for protobuf encodinghttp.TransportConfig{Endpoint, Username, Password}at construction, no globalsIntegration (not in this PR)
Test plan
parseKeyhandles single label, multiple labels, no labels, empty bracesgo build ./...compiles all packages