Skip to content

feat(jaeger): Expose default component factories via jaegercli.Components - #9073

Open
iammdzaidalam wants to merge 1 commit into
jaegertracing:mainfrom
iammdzaidalam:feat/jaegercli-export-components
Open

feat(jaeger): Expose default component factories via jaegercli.Components#9073
iammdzaidalam wants to merge 1 commit into
jaegertracing:mainfrom
iammdzaidalam:feat/jaegercli-export-components

Conversation

@iammdzaidalam

Copy link
Copy Markdown
Contributor

Which problem is this PR solving?

Description of the changes

  • Adds jaegercli.Components(), a re-export of internal.Components(), documented with the add-an-extension usage snippet
  • cmd/jaeger/main.go now calls it, so the default binary doubles as the reference example and no longer imports cmd/jaeger/internal
  • The exported set is the stock binary's set as is, so a distribution starting from it gets exactly what cmd/jaeger ships, including the e2e-only storagecleaner and remotestorage

How was this change tested?

  • New components_test.go covers parity with internal.Components(), the expected factories being present, and that removing one does not affect a later call
  • Both assertions were checked against a deliberately broken Components() so they fail when they should

Checklist

AI Usage in this PR

  • Light: AI provided minor assistance (formatting, simple suggestions)

…ents

Signed-off-by: iammdzaidalam <161572905+iammdzaidalam@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 22, 2026 13:06
@iammdzaidalam
iammdzaidalam requested a review from a team as a code owner July 22, 2026 13:06
@dosubot dosubot Bot added the enhancement label Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a public way for downstream/custom Jaeger distributions to reuse the stock Jaeger component factory set (previously only available via cmd/jaeger/internal), enabling “default + extensions” without copying Jaeger’s internal component list.

Changes:

  • Added jaegercli.Components() as a thin, documented re-export of internal.Components().
  • Updated the standard cmd/jaeger binary to use jaegercli.Components() (so it serves as the reference example and avoids importing cmd/jaeger/internal directly).
  • Added unit tests to ensure the exported factories match internal.Components() and that repeated calls return independent factory sets.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
cmd/jaeger/main.go Switches the binary to use the new public jaegercli.Components() entrypoint.
cmd/jaeger/jaegercli/components.go Introduces the exported Components() API and documents intended downstream usage.
cmd/jaeger/jaegercli/components_test.go Adds tests for parity with internal defaults and independence across calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose default component factories publicly as a companion to jaegercli.NewCommand

2 participants