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

Is there a way to specify read-only connection? #364

Open
paras-blacklane opened this issue Sep 19, 2024 · 4 comments
Open

Is there a way to specify read-only connection? #364

paras-blacklane opened this issue Sep 19, 2024 · 4 comments

Comments

@paras-blacklane
Copy link

paras-blacklane commented Sep 19, 2024

Description

It would be nice to have a way to connect to a database in read-only mode. Maybe there's a way already, i didn't find it in the docs

@paras-blacklane paras-blacklane added the bug Something isn't working label Sep 19, 2024
@paras-blacklane
Copy link
Author

Can't seem to remove the bug label

@XSAM XSAM removed the bug Something isn't working label Sep 19, 2024
@XSAM
Copy link
Owner

XSAM commented Sep 19, 2024

It would be nice to have a way to connect to a database in read-only mode.

I am not sure what is a read-only mode regarding database/sql. If you want to ensure no write operation can be made to the database through the connection, you should configure the permission of the database user.

@paras-blacklane
Copy link
Author

Something analogous to setting session characteristics in postgres would be useful. Yea there's always that option for creating a read-only user. But i needed this for something

@XSAM
Copy link
Owner

XSAM commented Sep 20, 2024

It seems like a db operation. Whether to have this feature is out of the scope of otelsql, as it is a wrapper to monitor the DB operations, not a driver that implements the functionality.

Assuming you are using a DB driver that supports functionality with database/sql interfaces, then otelsql should also support this feature.

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

No branches or pull requests

3 participants
@XSAM @paras-blacklane and others