Skip to content

Conversation

@trask
Copy link
Member

@trask trask commented Oct 24, 2025

Semconv doesn't have this concept.

HttpCommonAttributesGetter makes sense b/c it's common attributes across both client and server.

But in semconv, Sql "extends" Db semantic conventions, and so I think our getter hierarchy should do the same.

In practice, this means that Sql getter now has things like getDbOperationName(), which I think is probably good, though we can default them to null in the Sql getter interface to make them not required.

Related to #12608

@trask trask changed the title Remove DbClientCommonAttributesExtractor Remove DbClientCommonAttributesGetter Oct 24, 2025
@trask trask changed the title Remove DbClientCommonAttributesGetter Deprecate DbClientCommonAttributesGetter Oct 24, 2025
@trask trask marked this pull request as ready for review October 25, 2025 18:13
@trask trask requested a review from a team as a code owner October 25, 2025 18:13
Comment on lines +37 to +40
/**
* SqlClientAttributesExtractor will try to populate db.operation.name based on {@link
* #getRawQueryTexts(REQUEST)}, but this can be used to explicitly provide the operation name.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a copy-paste mistake

Comment on lines +47 to +50
/**
* SqlClientAttributesExtractor will try to populate db.operation.name based on {@link
* #getRawQueryTexts(REQUEST)}, but this can be used to explicitly provide the operation name.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a copy-paste mistake

@Override
public void onStart(AttributesBuilder attributes, Context parentContext, REQUEST request) {
super.onStart(attributes, parentContext, request);
// Common attributes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could consider placing the common part to util class or perhaps even a static package private method in DbClientAttributesExtractor that could also be called from here.

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.

2 participants