plugins with same alias, reports metrics only for last matching plugin
- Dominant language
- C
- Stars
- 8.1k
- Forks
- 2k
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 58
Description
## Bug Report
**Describe the bug**
When using the same alias for the same plugin instance, only metrics for the last matching instance are produced.
**To Reproduce**
Given this config:
```ini
[INPUT]
Name dummy
Alias same
rate 20
[INPUT]
Name dummy
Alias same
rate 10
```
I see metrics `/api/v1/metrics` with only one `same` plugin with `10` records per second.
Then if I change the order:
```ini
[INPUT]
Name dummy
Alias same
rate 10
[INPUT]
Name dummy
Alias same
rate 20
```
Now I see metrics with only one `same` plugin again, but with `20` records per second.
**Expected behavior**
Maybe it should not allow giving the same alias. Or it should use the internal instance ID to report metrics when there are more than one instance with the same alias.
**Your Environment**
* Version used: v1.9.8
* Environment: docker image `cr.fluentbit.io/fluent/fluent-bit:latest`
Contributor guide
Assessment
This issue has not been assessed yet.