opentelemetry-go-contrib
opentelemetry-go-contrib copied to clipboard
[otelmongo] should use `AttributeNetPeerIP` when hostname is a IP
https://github.com/open-telemetry/opentelemetry-go-contrib/blob/1e34aa359ff6cfe4ba2a44775d261311ea024197/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go#L54
should use semconv.NetPeerIPKey
when hostname is a IP
Hi @jixiuf can I take this up please
@jixiuf This looks abandoned. Can I take this up? Please assign this to me. I will open a PR along with the relevant unit tests.
@evantorrie @jmacd @XSAM Can I take this up?
Feel free to open a PR and link this issue on it.
@pellared, @dmathieu, I can pick this up since it looks abandoned, but a few questions:
- is this still needed?
- Based on what I see in the changelog, and the
NOTE
here it looks like we'd setNetSockPeerAddr
ifhostname
is an IP address, otherwise setNetPeerName
? - which unit tests are you referring to?
https://github.com/open-telemetry/opentelemetry-specification/blob/bb3d0a0d14f41ccd3f78852316c77705e722edfa/CHANGELOG.md?plain=1#L1126-L1127
https://github.com/open-telemetry/opentelemetry-go/blob/d37d851bbce65577ab340849ec6c540fdc6e3096/semconv/v1.17.0/trace.go#L1115-L1117
There is a plan to deprecate the module and move the ownership to MongoDB team.
I do not think it is worth to take the time in fix as there are no codeowners for this module so there is low chance that the PR will get a review.
Reference: https://jira.mongodb.org/browse/GODRIVER-2938
Blocked by https://github.com/open-telemetry/opentelemetry-go-contrib/issues/4678 (no codeowners).