tehseensajjad-sys opened a new issue, #12005: URL: https://github.com/apache/apisix/issues/12005
### Description
Im trying to push all logs to our local loki instance.
I want to add unique label for each route. But no form of log_label value
works other than when the key is removed, the default `{job = "apisix"}` is
added
the error i get is
```
unexpected status code 400; error message: {"error_msg":"failed to check the
configuration of plugin loki-logger err: property \"log_labels\" validation
failed: wrong type: expected object, got string"}
```
Values i have tried
```
plugins:
- config:
endpoint_addrs:
- example.com:3100
include_req_body: true
include_resp_body: true
log_labels: '{environment = "dev"}'
enable: true
name: loki-logger
```
```
...
log_labels:
environment: dev
...
```
```
...
log_labels: {"environment": "dev"}
...
```
### Environment
- APISIX version (run `apisix version`): 3.8.0
- Operating system (run `uname -a`): BottleRocket Nodes (Kubernetes
Deployment)
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
openresty/1.21.4.2
- etcd version, if relevant (run `curl
http://127.0.0.1:9090/v1/server_info`): 3.5.7
- Route deployment method: k8s crd, `apisix.apache.org/v2` `ApisixRoute`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
