zitadel/internal/query
Tim Möhlmann 7ef95c9194
fix(db): wrap BeginTx in spans to get acquire metrics (#7689)
feat(db): wrap BeginTx in spans to get acquire metrics

This changes adds a span around most db.BeginTx calls so we can get tracings about the connection pool acquire process.
This might help us pinpoint why sometimes some query package traces show longer execution times, while this was not reflected on database side execution times.

Co-authored-by: Silvan <silvan.reusser@gmail.com>
(cherry picked from commit 093dd57a78)
2024-04-09 14:03:03 +02:00
..
embed feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
projection feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
testdata fix(oidc): return clients without instance settings (#7036) 2023-12-07 09:43:45 +00:00
access_token.go feat(oidc): token exchange impersonation (#7516) 2024-03-20 10:18:46 +00:00
action_flow_test.go perf: remove owner removed columns from projections for oidc (#6925) 2023-11-20 17:21:08 +02:00
action_flow.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
action_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
action.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
app_test.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
app.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
auth_request_test.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
auth_request.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
authn_key_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
authn_key.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
certificate_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
certificate.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
converter.go feat(api): feature flags (#7356) 2024-02-28 10:55:54 +02:00
current_state_test.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
current_state.go fix(db): wrap BeginTx in spans to get acquire metrics (#7689) 2024-04-09 14:03:03 +02:00
custom_text_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
custom_text.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
device_auth_model.go feat(oidc): id token for device authorization (#7088) 2023-12-20 13:21:08 +01:00
device_auth_test.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
device_auth.go feat(oidc): id token for device authorization (#7088) 2023-12-20 13:21:08 +01:00
domain_policy_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
domain_policy.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
event.go feat: block instances (#7129) 2024-01-17 10:16:48 +00:00
execution_test.go feat: query side for executions and targets for actions v2 (#7524) 2024-03-14 09:56:23 +00:00
execution.go feat: query side for executions and targets for actions v2 (#7524) 2024-03-14 09:56:23 +00:00
failed_events_test.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
failed_events.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
generic.go feat: query side for executions and targets for actions v2 (#7524) 2024-03-14 09:56:23 +00:00
iam_member_test.go feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
iam_member.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
idp_login_policy_link_test.go feat(storage): read only transactions for queries (#6415) 2023-08-22 10:49:22 +00:00
idp_login_policy_link.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
idp_template_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
idp_template.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
idp_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
idp_user_link_test.go feat(storage): read only transactions for queries (#6415) 2023-08-22 10:49:22 +00:00
idp_user_link.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
idp.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
instance_by_domain.sql fix(query): optimize instance by domain query (#7513) 2024-03-06 18:02:16 +00:00
instance_by_id.sql fix: assign instance ID to aggregate ID when converting from v1 to v2 feature (#7505) 2024-03-05 16:12:49 +01:00
instance_domain_test.go feat(storage): read only transactions for queries (#6415) 2023-08-22 10:49:22 +00:00
instance_domain.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
instance_features_model.go feat(oidc): token exchange impersonation (#7516) 2024-03-20 10:18:46 +00:00
instance_features_test.go feat: implement user schema management (#7416) 2024-03-12 13:50:13 +00:00
instance_features.go feat(oidc): token exchange impersonation (#7516) 2024-03-20 10:18:46 +00:00
instance_test.go feat(api): feature flags (#7356) 2024-02-28 10:55:54 +02:00
instance.go feat: improve instance not found error (#7413) 2024-02-28 10:49:57 +00:00
introspection_test.go perf(oidc): optimize the introspection endpoint (#6909) 2023-11-21 13:11:38 +01:00
introspection.go perf(oidc): optimize the introspection endpoint (#6909) 2023-11-21 13:11:38 +01:00
key_test.go fix(oidc): ignore public key expiry for ID Token hints (#7293) 2024-01-29 15:11:52 +00:00
key.go fix(oidc): ignore public key expiry for ID Token hints (#7293) 2024-01-29 15:11:52 +00:00
label_policy.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
lockout_policy_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
lockout_policy.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
login_name.go perf: remove owner removed columns from projections for oidc (#6925) 2023-11-20 17:21:08 +02:00
login_policy_test.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
login_policy.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
mail_template.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
member_roles.go fix(query): realtime data on defined requests (#3726) 2022-06-14 07:51:00 +02:00
member.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
message_text_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
message_text.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
milestone_test.go feat(storage): read only transactions for queries (#6415) 2023-08-22 10:49:22 +00:00
milestone.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
notification_policy_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
notification_policy.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
notification_provider_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
notification_provider.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
oidc_client_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
oidc_client.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
oidc_settings_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
oidc_settings.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
org_domain_test.go feat(storage): read only transactions for queries (#6415) 2023-08-22 10:49:22 +00:00
org_domain.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
org_member_test.go feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
org_member.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
org_metadata_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
org_metadata.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
org_test.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
org.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
password_age_policy_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
password_age_policy.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
password_complexity_policy_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
password_complexity_policy.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
prepare_test.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
privacy_policy_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
privacy_policy.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
project_grant_member_test.go feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
project_grant_member.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
project_grant_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
project_grant.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
project_member_test.go feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
project_member.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
project_role_test.go perf: remove owner removed columns from projections for oidc (#6925) 2023-11-20 17:21:08 +02:00
project_role.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
project_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
project.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
query_test.go fix(setup): init projections (#7194) 2024-01-25 17:28:20 +01:00
query.go fix(setup): init projections (#7194) 2024-01-25 17:28:20 +01:00
quota_notifications_test.go perf: project quotas and usages (#6441) 2023-09-15 16:58:45 +02:00
quota_notifications.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
quota_periods_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
quota_periods.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
quota_test.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
quota.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
restrictions_test.go fix: projection version of restrictions (#7028) 2023-12-06 10:30:56 +00:00
restrictions.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
search_query_test.go fix(query): escape wildcards in text search (#7131) (#7135) 2024-01-02 16:27:36 +01:00
search_query.go fix(query): escape wildcards in text search (#7131) (#7135) 2024-01-02 16:27:36 +01:00
secret_generator_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
secret_generators.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
security_policy.go feat: impersonation roles (#7442) 2024-02-28 10:21:11 +00:00
session.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
sessions_test.go feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
sms_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
sms.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
smtp_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
smtp.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
system_features_model.go feat(oidc): token exchange impersonation (#7516) 2024-03-20 10:18:46 +00:00
system_features_test.go feat: implement user schema management (#7416) 2024-03-12 13:50:13 +00:00
system_features.go feat(oidc): token exchange impersonation (#7516) 2024-03-20 10:18:46 +00:00
target_test.go feat: query side for executions and targets for actions v2 (#7524) 2024-03-14 09:56:23 +00:00
target.go feat: query side for executions and targets for actions v2 (#7524) 2024-03-14 09:56:23 +00:00
user_auth_method_test.go feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
user_auth_method.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
user_by_id.sql feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
user_by_login_name.sql feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
user_grant_test.go feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
user_grant.go fix(console): display granted org name in authorizations and show user information (#7116) 2024-01-24 11:36:04 +01:00
user_membership_test.go perf: remove owner removed columns from projections for oidc (#6925) 2023-11-20 17:21:08 +02:00
user_membership.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
user_metadata_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
user_metadata.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
user_notify_by_id.sql feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
user_notify_by_login_name.sql feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
user_otp.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
user_password.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
user_personal_access_token_test.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
user_personal_access_token.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
user_schema_test.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
user_schema.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
user_test.go feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
user.go feat: add user v2 pw change required information on query (#7603) 2024-03-28 06:21:21 +00:00
userinfo_test.go chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
userinfo.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
zitadel_permission.go perf: remove owner removed columns from projections for oidc (#6925) 2023-11-20 17:21:08 +02:00