Skip to content

Add Prepare Request support to RequestTracker and OpenTelemetry extension #614

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

Merged
merged 9 commits into from
Sep 27, 2024

Conversation

joao-r-reis
Copy link
Collaborator

cc @simaoribeiro

It's a draft PR because I'll have to rebase this when #613 is merged, then I'll remove the draft status

Base automatically changed from otel-example to master September 20, 2024 10:27
@joao-r-reis joao-r-reis marked this pull request as ready for review September 20, 2024 10:32
@joao-r-reis
Copy link
Collaborator Author

I decided to rename RequestTrackingInfo to SessionRequestInfo and HostTrackingInfo to NodeRequestInfo, I think these names are more appropriate, wdyt @simaoribeiro

@simaoribeiro
Copy link
Contributor

I think it makes sense @joao-r-reis . It makes more clear what those objects are

@simaoribeiro
Copy link
Contributor

I'm happy that you found the time to support Prepared Statements. This is looking really good

@joao-r-reis
Copy link
Collaborator Author

Sneak peek:

image (4)
image (3)
image (6)
image (5)

@simaoribeiro
Copy link
Contributor

simaoribeiro commented Sep 20, 2024

Those images are looking sweet.

Btw, I just realized that we might have a problem regarding the Keyspace. The keyspace information only appears if its set in the Statement object which means that the db.namespace attribute may not appear in all use cases

@joao-r-reis
Copy link
Collaborator Author

Btw, I just realized that we might have a problem regarding the Keyspace. The keyspace information only appears if its set in the Statement object which means that the db.namespace attribute may not appear in all use cases

I already knew this but I thought this is ok since the attribute is only required if it's available and you even added a test that verifies that this attribute is not there when the keyspace is not set in the session.

I didn't test this but it is possible that for Prepared Statements the Keyspace will be there even if it is not set at the session level (but then again it's not that relevant since all we can do is set the attribute if the keyspace is there and not set it if it isn't)

@simaoribeiro
Copy link
Contributor

simaoribeiro commented Sep 23, 2024

Oh, yeah, I forgot that I included that test. It seemed that made sense at the time and I think it's fine if the attribute is available when its set.

@joao-r-reis joao-r-reis merged commit 7d4b37a into master Sep 27, 2024
5 checks passed
@joao-r-reis joao-r-reis deleted the otel-prepared branch September 27, 2024 14:46
@joao-r-reis joao-r-reis added this to the 3.22.0 milestone Sep 27, 2024
@xsoheilalizadeh
Copy link
Contributor

Hi @joao-r-reis, we have plan to use this feature on our codebase, do you have a ETA for releasing the 3.22.0?

@joao-r-reis
Copy link
Collaborator Author

3.22.0 is going out today

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.

3 participants