Skip to content

Commit 852ea96

Browse files
committed
fix: add otel annotation on a few methods
1 parent c161cc2 commit 852ea96

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/main/java/io/supertokens/storage/postgresql/Start.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
import io.supertokens.pluginInterface.oauth.exception.DuplicateOAuthLogoutChallengeException;
7070
import io.supertokens.pluginInterface.oauth.exception.OAuthClientNotFoundException;
7171
import io.supertokens.pluginInterface.opentelemetry.OtelProvider;
72+
import io.supertokens.pluginInterface.opentelemetry.WithinOtelSpan;
7273
import io.supertokens.pluginInterface.passwordless.PasswordlessCode;
7374
import io.supertokens.pluginInterface.passwordless.PasswordlessDevice;
7475
import io.supertokens.pluginInterface.passwordless.PasswordlessImportUser;
@@ -127,6 +128,7 @@
127128

128129
import static io.supertokens.storage.postgresql.QueryExecutorTemplate.execute;
129130

131+
@WithinOtelSpan
130132
public class Start
131133
implements SessionSQLStorage, EmailPasswordSQLStorage, EmailVerificationSQLStorage, ThirdPartySQLStorage,
132134
JWTRecipeSQLStorage, PasswordlessSQLStorage, UserMetadataSQLStorage, UserRolesSQLStorage, UserIdMappingStorage,

src/main/java/io/supertokens/storage/postgresql/queries/GeneralQueries.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import io.supertokens.pluginInterface.exceptions.StorageTransactionLogicException;
2727
import io.supertokens.pluginInterface.multitenancy.AppIdentifier;
2828
import io.supertokens.pluginInterface.multitenancy.TenantIdentifier;
29+
import io.supertokens.pluginInterface.opentelemetry.WithinOtelSpan;
2930
import io.supertokens.storage.postgresql.ConnectionPool;
3031
import io.supertokens.storage.postgresql.PreparedStatementValueSetter;
3132
import io.supertokens.storage.postgresql.Start;
@@ -796,6 +797,7 @@ public static void setKeyValue(Start start, TenantIdentifier tenantIdentifier, S
796797
}
797798
}
798799

800+
@WithinOtelSpan
799801
public static KeyValueInfo getKeyValue(Start start, TenantIdentifier tenantIdentifier, String key)
800802
throws SQLException, StorageQueryException {
801803
String QUERY = "SELECT value, created_at_time FROM " + getConfig(start).getKeyValueTable()

0 commit comments

Comments
 (0)