Skip to content

workspace: split into prometheus-expfmt, prometheus-relabel, and prometheus-scrape-manager - #48

Merged
bwplotka merged 2 commits into
mainfrom
bwplotka/workspace-crates
Nov 12, 2026
Merged

bwplotka merged 2 commits into
mainfrom
bwplotka/workspace-crates

Conversation

@bwplotka

Copy link
Copy Markdown
Member

Prepares prometheus/scrape.rs for publishing to crates.io (unblocking open-telemetry/otel-arrow#4630) by splitting the repository into a three-crate Cargo workspace along the pure-CPU sync vs async network/runtime I/O boundary:

  • prometheus-expfmt (crates/expfmt): wire exposition format negotiation, Layer 0 parsers, ArrowDecoder, and Protobuf DTOs (pure CPU, zero async/network dependencies).
  • prometheus-relabel (crates/relabel): Prometheus-compatible target and metric relabeling plus Stage 1/2 dictionary pushdown primitives (regex, serde, thiserror).
  • prometheus-scrape-manager (crates/scrape-manager, publish = false until discovery and scrape pool PRs land): workspace crate for http_config, service discoveries (discovery), and target scrape scheduling (scrape), avoiding the prometheus-scrape / prometheus-scraper name collisions on crates.io.

Also adds the Apache-2.0 LICENSE, crate-level README.md and exclude rules so .crate tarballs omit testdata/ and benchmarks (100 KiB for prometheus-expfmt, 20 KiB for prometheus-relabel), and .github/workflows/release.yml for GitHub Release publishing via rust-lang/crates-io-auth-action (OIDC Trusted Publishing) and cargo publish --workspace --locked.

Commits in order:

  • 2bc55b1 workspace: split into prometheus-expfmt, prometheus-relabel, and prometheus-scrape-manager
  • 29d6bb0 ci, docs: add Apache-2.0 LICENSE, crates.io release workflow, and workspace docs

…etheus-scrape-manager

Convert scrape.rs into a Cargo workspace along the pure-CPU sync vs async network/runtime boundary:
- crates/expfmt (prometheus-expfmt): wire exposition format negotiation, Layer 0 parsers, ArrowDecoder, and Protobuf DTOs.
- crates/relabel (prometheus-relabel): target and metric relabeling plus Stage 1/2 dictionary pushdown primitives.
- crates/scrape-manager (prometheus-scrape-manager, publish = false for now): workspace home for upcoming discovery, http_config, and scrape manager modules.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
…kspace docs

Prepare workspace crates for crates.io publication and automated GitHub Release publishing:
- Add Apache-2.0 LICENSE at the repository root and symlink into each crate directory so packaged .crate tarballs include the license text.
- Add .github/workflows/release.yml using rust-lang/crates-io-auth-action (OIDC Trusted Publishing) and cargo publish --workspace --locked on published GitHub Releases (plus workflow_dispatch --dry-run).
- Update README.md, AGENTS.md, and specs/SPEC.md for the three-crate workspace layout.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
@bwplotka
bwplotka marked this pull request as ready for review November 12, 2026 07:46
@bwplotka

Copy link
Copy Markdown
Member Author

Effectively

image

@saswatamcode saswatamcode left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

@bwplotka
bwplotka merged commit 159418e into main Nov 12, 2026
4 checks passed
@bwplotka
bwplotka deleted the bwplotka/workspace-crates branch November 12, 2026 08:11
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.

3 participants