FeiYing9 commented on issue #11934:
URL: https://github.com/apache/apisix/issues/11934#issuecomment-2608725491
> I believe the issue is with metric expiration logic.
>
> I was able to reproduce it locally when I set the expiration time to a low
value (like `expire: 10`) and had more than 1 worker process (I tested on 6,
but with more workers, it's easier to reproduce).
>
> Removing metrics expiration configuration resolves duplicates
>
> **Environment**
>
> ```
> APISIX version (run apisix version): 3.11.0
> Operating system (run uname -a): Linux 82435988518b 6.10.14-linuxkit #1
SMP Fri Nov 29 17:22:03 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
> OpenResty / Nginx version (run openresty -V or nginx -V):
openresty/1.25.3.2
> ```
i config the expiration like this:
```yaml
plugin_attr:
prometheus:
expire: 16
metrics:
http_status:
```
then i refer to this [example
config](https://github.com/apache/apisix/blob/0cb7d9ac8def4a490c8b49b7755a9484f3018eb2/conf/config.yaml.example#L599)
, seem that i make the wrong config of expire, so it's useless?
```yaml
prometheus: # Plugin: prometheus
# metrics: # Create extra labels from nginx variables:
https://nginx.org/en/docs/varindex.html
# http_status:
# expire: 0 # The expiration time after which metrics are removed.
unit: second.
# # 0 means the metrics will not expire
```
--
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]