@testdriverai/runner 7.8.0-canary.16 → 7.8.0-canary.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/lib/ably-service.js +4 -3
- package/package.json +1 -1
- package/sandbox-agent.js +4 -1
package/index.js
CHANGED
|
@@ -56,7 +56,7 @@ const IS_MACOS = process.platform === 'darwin';
|
|
|
56
56
|
// ─── Configuration ───────────────────────────────────────────────────────────
|
|
57
57
|
|
|
58
58
|
const API_KEY = process.env.TD_API_KEY;
|
|
59
|
-
const envName = process.env.TD_ENV || 'stable';
|
|
59
|
+
const envName = process.env.TD_CHANNEL || process.env.TD_ENV || 'stable';
|
|
60
60
|
const envConfig = environments[envName] || environments.stable;
|
|
61
61
|
const API_ROOT = process.env.TD_API_ROOT || process.env.API_ROOT || envConfig.apiRoot;
|
|
62
62
|
const RUNNER_ID = process.env.TD_RUNNER_ID;
|
package/lib/ably-service.js
CHANGED
|
@@ -177,16 +177,17 @@ class AblyService extends EventEmitter {
|
|
|
177
177
|
const text = typeof msg === 'string' ? msg : String(msg);
|
|
178
178
|
const isError = /error/i.test(text) || /\[Level 1\]/i.test(text);
|
|
179
179
|
if (isError) {
|
|
180
|
+
console.error(`[Ably runner] ${text}`);
|
|
180
181
|
Sentry.withScope((scope) => {
|
|
181
182
|
scope.setTag('ably.client', 'runner');
|
|
182
183
|
scope.setTag('sandbox.id', self._sandboxId);
|
|
183
|
-
scope.setContext('ably_log', { raw: text
|
|
184
|
-
Sentry.captureMessage(`[Ably runner] ${text
|
|
184
|
+
scope.setContext('ably_log', { raw: text });
|
|
185
|
+
Sentry.captureMessage(`[Ably runner] ${text}`, 'error');
|
|
185
186
|
});
|
|
186
187
|
}
|
|
187
188
|
Sentry.addBreadcrumb({
|
|
188
189
|
category: 'ably.log',
|
|
189
|
-
message: text
|
|
190
|
+
message: text,
|
|
190
191
|
level: isError ? 'error' : 'info',
|
|
191
192
|
data: { client: 'runner', sandboxId: self._sandboxId },
|
|
192
193
|
});
|
package/package.json
CHANGED
package/sandbox-agent.js
CHANGED
|
@@ -205,10 +205,13 @@ async function main() {
|
|
|
205
205
|
// Sample all runner-initiated traces (shouldn't happen often)
|
|
206
206
|
return 1.0;
|
|
207
207
|
},
|
|
208
|
-
environment: process.env.
|
|
208
|
+
environment: config.sentryEnvironment || process.env.TD_ENV || 'production',
|
|
209
209
|
release: version,
|
|
210
210
|
serverName: os.hostname(),
|
|
211
211
|
});
|
|
212
|
+
if (config.sentryChannel || process.env.TD_CHANNEL) {
|
|
213
|
+
Sentry.setTag('channel', config.sentryChannel || process.env.TD_CHANNEL);
|
|
214
|
+
}
|
|
212
215
|
log('Sentry initialized');
|
|
213
216
|
}
|
|
214
217
|
log(`Sandbox ID: ${config.sandboxId}`);
|