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

feat: Add db.system indicators to redis, sqlalchemy, and django #2035

Closed
wants to merge 4 commits into from

Conversation

AbhiPrasad
Copy link
Member

ref getsentry/team-webplatform-meta#60

dependent on getsentry/develop#917

Add this information to span data field as db.system, matching OpenTelemetry's well known conventions.

For example, db.system of postgresql would indicate that it's a postgres database.

@@ -578,7 +580,10 @@ def execute(self, sql, params=None):

with record_sql_queries(
hub, self.cursor, sql, params, paramstyle="format", executemany=False
):
) as span:
vendor = connection.vendor
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 realized this strategy doesn't work if you have multiple connections open, but not sure how common that is.

Copy link
Member

Choose a reason for hiding this comment

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

In Django it is common to have one connection to a read only replica of the database and one you use to change the data, so probably on bigger installations quite common.

@AbhiPrasad
Copy link
Member Author

AbhiPrasad commented Apr 25, 2023

Splitting this up in favour of 4 PRs:

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