Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!(mysql*,redis): net.peer.ip -> db.connection_string #913

Merged
merged 6 commits into from
Feb 24, 2022

Conversation

trask
Copy link
Member

@trask trask commented Feb 21, 2022

BEGIN_COMMIT_OVERRIDE
fix(mysql*,redis)!: net.peer.ip -> db.connection_string
END_COMMIT_OVERRIDE

Which problem is this PR solving?

  • mysql, mysql2, redis and ioredis instrumentation was capturing the connection string in the net.peer.ip attribute

Short description of the changes

  • changes these instrumentations (except ioredis, because that change seems to be hanging CI not sure why, I'll send PR for that change separately) to capture the connection string in the db.connection_string attribute

[I have other thoughts about whether db.connection_string should be captured at all in these cases (when it's a synthetically reconstructed value from existing telemetry data like net.peer.name, net.peer.port, db.name), but I will seek to clarify that point in the specification as it's unclear (see also open-telemetry/opentelemetry-java-instrumentation#3080)]

@codecov
Copy link

codecov bot commented Feb 21, 2022

Codecov Report

Merging #913 (5a7148a) into main (760c4d4) will decrease coverage by 0.25%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #913      +/-   ##
==========================================
- Coverage   95.91%   95.65%   -0.26%     
==========================================
  Files          13       20       +7     
  Lines         856     1244     +388     
  Branches      178      244      +66     
==========================================
+ Hits          821     1190     +369     
- Misses         35       54      +19     
Impacted Files Coverage Δ
...e/opentelemetry-instrumentation-mysql/src/utils.ts 100.00% <ø> (ø)
.../opentelemetry-instrumentation-mysql2/src/utils.ts 100.00% <ø> (ø)
...e/opentelemetry-instrumentation-redis/src/utils.ts 93.10% <ø> (ø)
...tapackages/auto-instrumentations-node/src/utils.ts 97.87% <0.00%> (ø)
...metry-instrumentation-mysql/src/instrumentation.ts 93.33% <0.00%> (ø)
...metry-instrumentation-redis/src/instrumentation.ts 93.47% <0.00%> (ø)
...etry-instrumentation-mysql2/src/instrumentation.ts 95.00% <0.00%> (ø)

@trask trask force-pushed the fix-db-connection-string branch 2 times, most recently from 7e237ce to de67ae5 Compare February 21, 2022 02:41
@trask trask force-pushed the fix-db-connection-string branch from 57b084d to 440f3c4 Compare February 22, 2022 05:28
@trask trask force-pushed the fix-db-connection-string branch from 3998c69 to 7cd1828 Compare February 22, 2022 17:08
@trask trask changed the title fix(mysql*,*redis): net.peer.ip -> db.connection_string fix(mysql*,redis): net.peer.ip -> db.connection_string Feb 22, 2022
@trask trask marked this pull request as ready for review February 22, 2022 18:10
@trask trask requested a review from a team February 22, 2022 18:10
@dyladan
Copy link
Member

dyladan commented Feb 22, 2022

WRT fix conventional commit subject, I think it might be better to use fix! to indicate this is a breaking change which will bump the semver minor (treated as major before 1.0) version.

@trask trask changed the title fix(mysql*,redis): net.peer.ip -> db.connection_string fix!(mysql*,redis): net.peer.ip -> db.connection_string Feb 22, 2022
@dyladan dyladan merged commit bf39b90 into open-telemetry:main Feb 24, 2022
@trask trask deleted the fix-db-connection-string branch February 24, 2022 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants