The Redis auto instrumentation is not working with redis-sentinel
Steps to reproduce
Setup a redis-sentinel and a redis instance, run an application with sentinel configurations.
What is the expected behavior?
Information for sentinel connections
What is the actual behavior?
"Traceback (most recent call last):
File "/home/vutuandat/.local/share/project_name-tNQ0Wzfa/lib/python3.8/site-packages/opentelemetry/instrumentation/redis/util.py", line 29, in _extract_conn_attributes
attributes["net.peer.name"] = conn_kwargs["host"]
KeyError: 'host'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vutuandat/.local/share/project_name-tNQ0Wzfa/lib/python3.8/site-packages/opentelemetry/sdk/trace/__init__.py", line 861, in use_span
yield span
File "/home/vutuandat/.local/share/project_name-tNQ0Wzfa/lib/python3.8/site-packages/opentelemetry/sdk/trace/__init__.py", line 774, in start_as_current_span
yield span_context
File "/home/vutuandat/.local/share/project_name-tNQ0Wzfa/lib/python3.8/site-packages/opentelemetry/instrumentation/redis/__init__.py", line 84, in _traced_execute_command
_set_connection_attributes(span, instance)
File "/home/vutuandat/.local/share/project_name-tNQ0Wzfa/lib/python3.8/site-packages/opentelemetry/instrumentation/redis/__init__.py", line 64, in _set_connection_attributes
for key, value in _extract_conn_attributes(
File "/home/vutuandat/.local/share/project_name-tNQ0Wzfa/lib/python3.8/site-packages/opentelemetry/instrumentation/redis/util.py", line 33, in _extract_conn_attributes
attributes["net.peer.name"] = conn_kwargs["path"]
KeyError: 'path'
"
The Redis auto instrumentation is not working with redis-sentinel
Steps to reproduce Setup a redis-sentinel and a redis instance, run an application with sentinel configurations.
What is the expected behavior? Information for sentinel connections
What is the actual behavior?
Additional context
python 3.8.5 opentelemetry-sdk 0.17b0 opentelemetry-instrumentation-redis 0.17b0
I did manage to make it run by adding
to https://github.com/open-telemetry/opentelemetry-python-contrib/blob/master/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/util.py#L33
however, I'm not sure which information we want to put in span tags.