-
Notifications
You must be signed in to change notification settings - Fork 18
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
Suggestion: Override instance
label value
#35
Comments
I can think of two different options to implement custom labels, under with this suggestion falls: Proposal 1Instead of providing a Example const labels = {
"format": ["apache_common", "logfmt"],
"os": ["linux"],
"namespace": 3,
"app": 2,
"instance": ["localhost"],
};
const conf = new loki.Config(BASE_URL, 10000, 1.0, labels); POC: https://github.com/grafana/xk6-loki/compare/chaudum/custom-labels?expand=1 Proposal 2Introduce a new, optional fifth argument for the Example const labels = loki.Labels({
"format": ["logfmt"],
"os": ["linux"],
"namespace": ["loki-prod", "loki-dev"],
"container": ["distributor", "ingester", "querier", "query-frontend", "query-scheduler", "index-gateway", "compactor"],
"instance": ["localhost"],
});
const conf = new loki.Config(BASE_URL, 10000, 1.0, {}, labels); POC: https://github.com/grafana/xk6-loki/compare/chaudum/custom-labels-2?expand=1 Personally I tend towards the 2nd proposal, since it is easier to understand. People often want to provide their own labels, and you could even read the values from a file in the setup context of the loadtest. |
Hey @chaudum . what if we combine both solutions?
so, users could specify either |
The problem that I see here is that it would break backwards compatibility because the input type for the argument changes. Allowing both |
yes, it might bring additional complexity but also it brings us flexibility and makes the config clear for the users. so we could do it. |
When running the extension as a Deployment in Kubernetes, the hostname is always a new value. This can lead to unwanted/unexpected behaviour since the
instance
label value of streams contains the hostname.The text was updated successfully, but these errors were encountered: