Skip to content

x/telemetry: allow to use custom config download logic #67726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hyangah opened this issue May 30, 2024 · 0 comments
Open

x/telemetry: allow to use custom config download logic #67726

hyangah opened this issue May 30, 2024 · 0 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done. telemetry x/telemetry issues
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented May 30, 2024

The current telemetry upload logic uses go mod download golang.org/x/telemetry/config@latest
to download the current upload configuration.

When the go command is the uploader, the go command can avoid this extra subprocess
by directly accessing its go mod download implementation. To enable this, we need a hook to register the custom implementation. For example,

package telemetry

type Config struct {
...
   // UploadConfig, if set, is used to retrieve the upload config.
   // Otherwise, the program downloads the config using `go mod download`.
   UploadConfig(ctx context.Context, version string) (cfg *UploadConfig, resolvedVersion string, _ error)
}
@gopherbot gopherbot added the telemetry x/telemetry issues label May 30, 2024
@gopherbot gopherbot added this to the Unreleased milestone May 30, 2024
@mknyszek mknyszek added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. telemetry x/telemetry issues
Projects
None yet
Development

No branches or pull requests

3 participants