open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.76k stars 2.19k forks source link

redisreceiver Add redis instance.endpoint in ResourceAttributes #33880

Open zhangjiabin1010 opened 3 weeks ago

zhangjiabin1010 commented 3 weeks ago

Component(s)

receiver/redis

Is your feature request related to a problem? Please describe.

redisreceiver Add redisinstance.endpoint in ResourceAttributes to distinguish different database instance connections。

Describe the solution you'd like

redisreceiver Add redisinstance.endpoint in ResourceAttributes

Describe alternatives you've considered

redis.instance.endpoint=10.10.1.0:6379

Additional context

No response

github-actions[bot] commented 3 weeks ago

Pinging code owners:

crobert-1 commented 3 weeks ago

Hello @zhangjiabin1010, can you use the resource detection processor in your data pipeline to add the resource attribute you're looking for? Something like this should work.

zhangjiabin1010 commented 2 weeks ago

你好@zhangjiabin1010,您可以使用数据管道中的资源检测处理器来添加您正在寻找的资源属性吗?类似这样的方法应该可行。

This seems to only detect the resource information of the machine where the collector is located. If my collector is on host:A and redis is on host:B. The IP and port of host:B should be added to the resource attributes of the redis indicator.