Skip to content
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

Feature Request: Expose alloy version in configuration #2544

Open
adlotsof opened this issue Jan 27, 2025 · 0 comments
Open

Feature Request: Expose alloy version in configuration #2544

adlotsof opened this issue Jan 27, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@adlotsof
Copy link
Contributor

Request

Analogue to the constants, ideally as part of the constants https://github.com/grafana/alloy/blob/main/syntax/internal/stdlib/constants.go, it would be extremely helpful to be abled to access the version of the alloy binary in the configuration.
For now, to archive this, setting an environment variable and retreiving the environment variable using sys.env() would be one option, another one would be to hardcode the version in the configuration file.

When using import.http to retreive configuration files from a central repository which receives constant updates, it would be much easier to manage the usage of new features and syntax elements if it would be possible to align the configuration files with the correct alloy version.

Looking at the code briefly, it seemed like an easy change (simply add the version to syntax/internal/constants.go). When looking more closely, it seems like this would cause a circular import and would not work.

Use case

managing 100s of alloy deployments with remotely stored configuration modules, to align the version of the modules with the version used in the deployment.

@adlotsof adlotsof added the enhancement New feature or request label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant