Skip to content

Commit 570d202

Browse files
committed
fix: add new config to config and devConfig.yamls, revert improper change
1 parent d4f5cba commit 570d202

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,7 @@ core_config_version: 0
182182
# (DIFFERENT_ACROSS_APPS | OPTIONAL | Default: 3600000) long value. Time in milliseconds for how long a webauthn
183183
# account recovery token is valid for.
184184
# webauthn_recover_account_token_lifetime:
185+
186+
# (OPTIONAL | Default: http://localhost:4317) string value. The URL of the OpenTelemetry collector to which the core
187+
# will send telemetry data. This should be in the format http://<host>:<port> or https://<host>:<port>.
188+
# otel_collector_connection_uri

devConfig.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,7 @@ disable_telemetry: true
182182
# (DIFFERENT_ACROSS_APPS | OPTIONAL | Default: 3600000) long value. Time in milliseconds for how long a webauthn
183183
# account recovery token is valid for.
184184
# webauthn_recover_account_token_lifetime:
185+
186+
# (OPTIONAL | Default: http://localhost:4317) string value. The URL of the OpenTelemetry collector to which the core
187+
# will send telemetry data. This should be in the format http://<host>:<port> or https://<host>:<port>.
188+
# otel_collector_connection_uri

src/main/java/io/supertokens/output/Logging.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ public static void error(Main main, TenantIdentifier tenantIdentifier, String me
237237
message = message.trim();
238238
if (getInstance(main) != null) {
239239
getInstance(main).errorLogger.error(getFormattedMessage(tenantIdentifier, message, e));
240-
TelemetryProvider.getInstance(main).createLogEvent(tenantIdentifier, message, "error");
240+
TelemetryProvider.getInstance(main)
241+
.createLogEvent(tenantIdentifier, getFormattedMessage(tenantIdentifier, message, e),
242+
"error");
241243
}
242244
if (toConsoleAsWell || getInstance(main) == null) {
243245
systemErr(prependTenantIdentifierToMessage(tenantIdentifier, message));

src/main/java/io/supertokens/telemetry/TelemetryProvider.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ private OpenTelemetry initializeOpenTelemetry(Main main) {
100100
.addLogRecordProcessor(
101101
BatchLogRecordProcessor.builder(
102102
OtlpGrpcLogRecordExporter.builder()
103-
.setEndpoint(collectorUri) // otel
104-
// collector
103+
.setEndpoint(collectorUri)
105104
.build())
106105

107106
.build())

0 commit comments

Comments
 (0)