You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug Grafana Alloy is a telemetry collector that uses a HCL-like language for configuration. Their configuration language "alloy" is almost exactly like HCL, except that it also seems to support dots in block identifiers.
// Collection: mount a local directory with a certain path speclocal.file_match"applogs" {
path_targets=[{"__path__" = "/tmp/app-logs/app.log"}]
}
// Collection: Take the file match as input, and scrape those mounted log filesloki.source.file"local_files" {
targets=local.file_match.applogs.targets// This specifies which component should process the logs next, the "link in the chain"forward_to=[loki.process.add_new_label.receiver]
}
// Transformation: pull some data out of the log message, and turn it into a labelloki.process"add_new_label" {
stage.logfmt {
mapping={
"extracted_level"="level",
}
}
// Add the value of "extracted_level" from the extracted map as a "level" labelstage.labels {
values={
"level"="extracted_level",
}
}
// The next link in the chain is the local_loki "receiver" (receives the telemetry)forward_to=[loki.write.local_loki.receiver]
}
// Anything that comes into this component gets written to the loki remote APIloki.write"local_loki" {
endpoint {
url="http://loki:3100/loki/api/v1/push"
}
}
It would be nice if this could be supported by this tree-sitter syntax. I know it's not exactly HCL, but I am not sure whether it already makes sense to fork this repo just for this minor addition.
To Reproduce
Steps to reproduce the behavior:
Write HCL-like syntax like above.
The tree-sitter marks this as invalid syntax.
Expected behavior
I'd like to see the dots supported in identifiers.
Screenshots None.
Additional context None.
The text was updated successfully, but these errors were encountered:
Describe the bug
Grafana Alloy is a telemetry collector that uses a HCL-like language for configuration. Their configuration language "alloy" is almost exactly like HCL, except that it also seems to support dots in block identifiers.
Example, copied from their documentation:
It would be nice if this could be supported by this tree-sitter syntax. I know it's not exactly HCL, but I am not sure whether it already makes sense to fork this repo just for this minor addition.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'd like to see the dots supported in identifiers.
Screenshots
None.
Additional context
None.
The text was updated successfully, but these errors were encountered: