Remove deprecated database instrumentation API methods#15944
Merged
Conversation
Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
Copilot
AI
changed the title
[WIP] Remove deprecated database instrumentation code
Remove deprecated database instrumentation API methods
Jan 20, 2026
…conv support Co-authored-by: trask <[email protected]>
trask
reviewed
Jan 20, 2026
| */ | ||
| @Deprecated | ||
| @Nullable | ||
| default String getUser(REQUEST request) { |
Member
There was a problem hiding this comment.
this method and getConnectionString were pulled down into this interface from the deleted DbClientCommonAttributesGetter
trask
approved these changes
Jan 20, 2026
laurit
reviewed
Jan 20, 2026
|
|
||
| // TODO: make this required to implement | ||
| @Nullable | ||
| default String getDbQueryText(REQUEST request) { |
Contributor
There was a problem hiding this comment.
I think we could consider making this required. The removal of getStatement would most likely break compilation of code that implements that method anyway (if it uses the @Overrides).
laurit
approved these changes
Jan 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes deprecated methods from database instrumentation APIs that have been replaced with newer alternatives following updated semantic conventions.
Core API Changes
Deleted
DbClientCommonAttributesGetterinterface - functionality consolidated intoDbClientAttributesGetterDbClientAttributesGetter:getStatement()→ usegetDbQueryText()getOperation()→ usegetDbOperationName()getResponseStatusCode(REQUEST, RESPONSE)→ usegetDbResponseStatusCode(RESPONSE, Throwable)getUser(),getConnectionString()(still needed for old semconv emission)SqlClientAttributesGetter:getBatchSize()→ usegetDbOperationBatchSize()getQueryParameters()→ usegetDbQueryParameters()SqlStatementInfo:getFullStatement()→ usegetQueryText()getOperation()→ usegetOperationName()getMainIdentifier()→ usegetCollectionName()/getStoredProcedureName()MultiQuery:getMainIdentifier(),getOperation(),getStatements()getCollectionName(),getStoredProcedureName(),getOperationName(),getQueryTexts()SqlClientAttributesExtractorBuilder:setTableAttribute()(still needed for old semconv support)Instrumentation Updates
Retained deprecated
getUser()andgetConnectionString()method overrides in implementations for old semconv support:Removed deprecated
getDbQueryText()overrides (converted to proper implementations):For Spymemcached, removed deprecated override (using default implementation).
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.