-
Notifications
You must be signed in to change notification settings - Fork 96
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
Support Regex-based Label \ Metadata matching #926
Comments
You refer to service discovery as supporting flexible relabeling. In fact so does the Alloy component But selecting labels to move to structured metadata is currently left to the Could it be possible to move the structured metadata selection to |
Request
This FR is similar to the following issue - grafana/loki#4987
The
loki.process
component should allow regex pattern matching on thestructured_metadata
andpack
stages.Use case
In a Alloy pipeline, when discovering k8s targets I can easily perform a
labelmap
to have access to all the discoverable__meta
labels and keep the ones I need.Now with these, in a
loki.process
component, I want to transform them into Loki Structured Metadata fields. This seems to be only possible by specifying a list of static names (Source).With k8s discovered targets, they tend to have the
__meta_kubernetes_*_annotation_*
and__meta_kubernetes_*_label_*
Labels. These values vary, and knowing all possible values, so that they get specified statically in thestage.structured_metadata
block stage of the component doesn't seem feasible. Making me lose some k8s labels and annotations that I want to keep.The text was updated successfully, but these errors were encountered: