feat(jaeger): Expose default component factories via jaegercli.Components - #9073
Open
iammdzaidalam wants to merge 1 commit into
Open
feat(jaeger): Expose default component factories via jaegercli.Components#9073iammdzaidalam wants to merge 1 commit into
iammdzaidalam wants to merge 1 commit into
Conversation
…ents Signed-off-by: iammdzaidalam <161572905+iammdzaidalam@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
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 ofinternal.Components(). - Updated the standard
cmd/jaegerbinary to usejaegercli.Components()(so it serves as the reference example and avoids importingcmd/jaeger/internaldirectly). - 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. |
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.
Which problem is this PR solving?
jaegercli.NewCommandtakes factories as a parameter, but there was no public way to obtain Jaeger's default set, so an out-of-tree distribution that wants the stock components plus one extra extension has to hand-copy the whole list out ofcmd/jaeger/internaland keep it in sync.Description of the changes
jaegercli.Components(), a re-export ofinternal.Components(), documented with the add-an-extension usage snippetcmd/jaeger/main.gonow calls it, so the default binary doubles as the reference example and no longer importscmd/jaeger/internalcmd/jaegerships, including the e2e-onlystoragecleanerandremotestorageHow was this change tested?
Checklist
make lint testAI Usage in this PR