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

Simplify db getter and extractor hierarchy #12602

Closed
wants to merge 6 commits into from

Conversation

trask
Copy link
Member

@trask trask commented Nov 10, 2024

Remove DbClientCommonAttributesGetter and DbClientCommonAttributesExtractor, consolidating their functionality into DbClientAttributesGetter and DbClientAttributesExtractor.

@trask trask marked this pull request as ready for review November 10, 2024 01:55
@trask trask requested a review from a team as a code owner November 10, 2024 01:56
@trask trask mentioned this pull request Nov 10, 2024
Comment on lines 11 to 12
@Deprecated
public interface DbClientCommonAttributesGetter<REQUEST> {
Copy link
Member Author

Choose a reason for hiding this comment

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

I returned this class to how it existed in the last release (v2.9.0), so the method removals in this class are ok if we merge before v2.10.0

import io.opentelemetry.instrumentation.api.internal.SpanKeyProvider;
import javax.annotation.Nullable;

abstract class DbClientCommonAttributesExtractor<
Copy link
Member Author

@trask trask Nov 11, 2024

Choose a reason for hiding this comment

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

this class was package-private, so I think ok to delete

@trask
Copy link
Member Author

trask commented Nov 11, 2024

Closing, I need to think about this more.

I'm not sure that SqlClientAttributesGetter should inherit getDbOperationName() and getDbQueryText() since those are calculated from getRawQueryText().

Also not sure where getDbCollectionName() should end up in the hierarchy.

@trask trask closed this Nov 11, 2024
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.

1 participant