Skip to content

Conversation

@denrase
Copy link
Collaborator

@denrase denrase commented May 6, 2025

📜 Description

Supabase instrumentation for database operations (no auth instrumentation)

  • Breadcrumbs
  • Body Redaction
  • Tracing
  • Errors
  • PII (Body, Query)

💡 Motivation and Context

Closes #2727

💚 How did you test it?

Unit tests.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

@codecov
Copy link

codecov bot commented May 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.12%. Comparing base (6e7d494) to head (de422e0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2913   +/-   ##
=======================================
  Coverage   88.12%   88.12%           
=======================================
  Files         295      295           
  Lines       10122    10122           
=======================================
  Hits         8920     8920           
  Misses       1202     1202           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2025

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 364.02 ms 362.76 ms -1.27 ms
Size 13.93 MiB 15.06 MiB 1.13 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
75284dc 512.39 ms 530.87 ms 18.48 ms
e45c0e1 447.29 ms 558.33 ms 111.04 ms
fd88186 422.07 ms 469.10 ms 47.03 ms
819c1e7 449.80 ms 442.98 ms -6.82 ms
2cf9161 454.12 ms 512.67 ms 58.55 ms
c1e775e 482.36 ms 608.98 ms 126.62 ms
6e7d494 397.35 ms 378.91 ms -18.43 ms
79f6b41 469.66 ms 525.90 ms 56.24 ms
5a95d04 378.92 ms 364.33 ms -14.59 ms
793f4dc 462.68 ms 544.21 ms 81.53 ms

App size

Revision Plain With Sentry Diff
75284dc 13.93 MiB 14.93 MiB 1.00 MiB
e45c0e1 6.54 MiB 7.70 MiB 1.16 MiB
fd88186 13.93 MiB 15.00 MiB 1.06 MiB
819c1e7 13.93 MiB 15.00 MiB 1.06 MiB
2cf9161 6.54 MiB 7.70 MiB 1.16 MiB
c1e775e 6.54 MiB 7.70 MiB 1.17 MiB
6e7d494 13.93 MiB 15.06 MiB 1.13 MiB
79f6b41 6.54 MiB 7.69 MiB 1.15 MiB
5a95d04 13.93 MiB 15.06 MiB 1.13 MiB
793f4dc 6.54 MiB 7.69 MiB 1.15 MiB

Previous results on branch: feat/supabase

Startup times

Revision Plain With Sentry Diff
d2f4fd9 453.31 ms 507.02 ms 53.71 ms
b0f288d 462.92 ms 452.48 ms -10.44 ms
1476f86 477.10 ms 480.87 ms 3.77 ms
5e3ca91 451.24 ms 496.74 ms 45.50 ms
8bd9497 470.21 ms 524.26 ms 54.05 ms
22c24e6 483.94 ms 485.42 ms 1.48 ms
5454931 447.86 ms 439.08 ms -8.78 ms
77c7ea9 447.20 ms 497.53 ms 50.33 ms
30c089b 471.71 ms 522.65 ms 50.94 ms
0ab2edd 459.85 ms 506.63 ms 46.77 ms

App size

Revision Plain With Sentry Diff
d2f4fd9 6.54 MiB 7.53 MiB 1017.45 KiB
b0f288d 13.93 MiB 15.00 MiB 1.06 MiB
1476f86 13.93 MiB 14.93 MiB 1.00 MiB
5e3ca91 6.44 MiB 7.44 MiB 1017.53 KiB
8bd9497 6.44 MiB 7.43 MiB 1013.21 KiB
22c24e6 13.93 MiB 15.06 MiB 1.13 MiB
5454931 13.93 MiB 15.00 MiB 1.06 MiB
77c7ea9 6.54 MiB 7.70 MiB 1.17 MiB
30c089b 6.44 MiB 7.43 MiB 1010.46 KiB
0ab2edd 6.54 MiB 7.53 MiB 1016.33 KiB

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2025

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1245.98 ms 1249.29 ms 3.31 ms
Size 5.53 MiB 6.01 MiB 488.14 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
0fb45d0 1273.24 ms 1286.44 ms 13.19 ms
c8596a6 1234.11 ms 1241.19 ms 7.08 ms
aeb02f2 1244.29 ms 1256.55 ms 12.26 ms
5a95d04 1263.17 ms 1265.37 ms 2.20 ms
e2d675d 1238.48 ms 1242.76 ms 4.28 ms
9b99523 1256.06 ms 1270.33 ms 14.27 ms
8541716 1270.18 ms 1271.80 ms 1.62 ms
de377fd 1252.28 ms 1254.76 ms 2.48 ms
2cf9161 1248.33 ms 1266.55 ms 18.22 ms
5b9a0da 1249.69 ms 1250.71 ms 1.03 ms

App size

Revision Plain With Sentry Diff
0fb45d0 7.86 MiB 9.44 MiB 1.58 MiB
c8596a6 7.86 MiB 9.44 MiB 1.58 MiB
aeb02f2 7.86 MiB 9.44 MiB 1.58 MiB
5a95d04 5.53 MiB 6.01 MiB 487.81 KiB
e2d675d 7.86 MiB 9.44 MiB 1.58 MiB
9b99523 7.86 MiB 9.44 MiB 1.58 MiB
8541716 5.53 MiB 6.00 MiB 479.96 KiB
de377fd 20.71 MiB 22.43 MiB 1.73 MiB
2cf9161 7.86 MiB 9.44 MiB 1.58 MiB
5b9a0da 5.53 MiB 5.96 MiB 444.32 KiB

Previous results on branch: feat/supabase

Startup times

Revision Plain With Sentry Diff
77c7ea9 1264.57 ms 1279.47 ms 14.89 ms
0a08454 1265.15 ms 1283.18 ms 18.04 ms
d2f4fd9 1252.60 ms 1271.13 ms 18.52 ms
22c24e6 1254.75 ms 1265.22 ms 10.47 ms
f8ec07b 1259.06 ms 1273.22 ms 14.16 ms
e4d1bf6 1249.16 ms 1267.12 ms 17.96 ms
34b0923 1269.29 ms 1275.88 ms 6.59 ms
b0f288d 1261.51 ms 1264.02 ms 2.51 ms
5454931 1266.92 ms 1270.20 ms 3.29 ms
5e3ca91 1263.90 ms 1277.43 ms 13.53 ms

App size

Revision Plain With Sentry Diff
77c7ea9 7.86 MiB 9.44 MiB 1.58 MiB
0a08454 8.43 MiB 10.01 MiB 1.58 MiB
d2f4fd9 7.86 MiB 9.45 MiB 1.59 MiB
22c24e6 5.53 MiB 6.00 MiB 485.11 KiB
f8ec07b 7.86 MiB 9.44 MiB 1.58 MiB
e4d1bf6 8.43 MiB 10.00 MiB 1.56 MiB
34b0923 8.43 MiB 10.01 MiB 1.58 MiB
b0f288d 5.53 MiB 6.00 MiB 479.95 KiB
5454931 5.53 MiB 6.00 MiB 479.95 KiB
5e3ca91 8.43 MiB 10.00 MiB 1.56 MiB

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@buenaflor
Copy link
Contributor

@denrase could you have a look at cursor comments pls

@denrase
Copy link
Collaborator Author

denrase commented Oct 14, 2025

@buenaflor Issues should be addressed now.

}
span.setData('db.operation', supabaseRequest.operation.value);
span.setData('db.sql.query', supabaseRequest.generateSqlQuery());
span.setData('db.system', 'postgres');
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
span.setData('db.system', 'postgres');
span.setData('db.system', 'postgresql');

Comment on lines +61 to +82
final dbSchema = supabaseRequest.request.headers['Accept-Profile'] ??
supabaseRequest.request.headers['Content-Profile'];
if (dbSchema != null) {
span.setData('db.schema', dbSchema);
}
span.setData('db.table', supabaseRequest.table);
span.setData('db.url', supabaseRequest.request.url.origin);
final dbSdk = supabaseRequest.request.headers['X-Client-Info'];
if (dbSdk != null) {
span.setData('db.sdk', dbSdk);
}
// ignore: invalid_use_of_internal_member
if (supabaseRequest.query.isNotEmpty && _hub.options.sendDefaultPii) {
span.setData('db.query', supabaseRequest.query);
}
// ignore: invalid_use_of_internal_member
if (supabaseRequest.body != null && _hub.options.sendDefaultPii) {
span.setData('db.body', supabaseRequest.body);
}
span.setData('db.operation', supabaseRequest.operation.value);
span.setData('db.sql.query', supabaseRequest.generateSqlQuery());
span.setData('db.system', 'postgres');
Copy link
Contributor

Choose a reason for hiding this comment

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

we can put all these constant span data key/values into the constants.dart file within SentrySpanData

Copy link
Contributor

Choose a reason for hiding this comment

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

we can make use of this constants file also for the other constants used in this PR


### Features

- Sentry Supabase Integration ([#2913](https://github.com/getsentry/sentry-dart/pull/2913))
Copy link
Contributor

Choose a reason for hiding this comment

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

  • 🚫 The changelog entry seems to be part of an already released section ## 9.8.0.
    Consider moving the entry to the ## Unreleased section, please.


## 9.7.0

### Features
Copy link

Choose a reason for hiding this comment

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

Bug

The Supabase integration feature entry is incorrectly placed under version 9.8.0 when it should be under version 9.7.0 based on the PR description. The CHANGELOG.md changes show that:

  1. The feature was added under "## 9.8.0" at line 13-14
  2. A duplicate "## 9.7.0" section starts at line 16
  3. The existing 9.7.0 section starts at line 18

This creates a duplicate version heading and misplaces the feature announcement. Based on the PR description stating this is about adding Supabase integration, and looking at the rest of the context showing this is a new v9.x release, the Supabase feature should likely be under version 9.7.0 or the version structure needs to be fixed to remove the duplicate 9.7.0 heading.

Fix in Cursor Fix in Web

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.

Supabase Support

3 participants