mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Downgrade Rudderstack SDK (no-changelog) (#8107)
This reverts commit a895ee87fc (#8090)
Our telemetry backend is throwing 500s with the updated rudderstack sdk.
Until that is resolved, we need to downgrade.
## Review / Merge checklist
- [x] PR title and summary are descriptive
This commit is contained in:
committed by
GitHub
parent
fcff34c401
commit
81994ce13d
@@ -60,7 +60,7 @@ export class Telemetry {
|
||||
const logLevel = config.getEnv('logs.level');
|
||||
|
||||
const { default: RudderStack } = await import('@rudderstack/rudder-sdk-node');
|
||||
this.rudderStack = new RudderStack(key, { logLevel, dataPlaneUrl: url });
|
||||
this.rudderStack = new RudderStack(key, url, { logLevel });
|
||||
|
||||
this.startPulse();
|
||||
}
|
||||
@@ -154,8 +154,16 @@ export class Telemetry {
|
||||
|
||||
async trackN8nStop(): Promise<void> {
|
||||
clearInterval(this.pulseIntervalReference);
|
||||
await this.track('User instance stopped');
|
||||
await Promise.all([this.postHog.stop(), this.rudderStack?.flush()]);
|
||||
void this.track('User instance stopped');
|
||||
return new Promise<void>(async (resolve) => {
|
||||
await this.postHog.stop();
|
||||
|
||||
if (this.rudderStack) {
|
||||
this.rudderStack.flush(resolve);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async identify(traits?: {
|
||||
@@ -186,7 +194,7 @@ export class Telemetry {
|
||||
return new Promise<void>((resolve) => {
|
||||
if (this.rudderStack) {
|
||||
const { user_id } = properties;
|
||||
const updatedProperties = {
|
||||
const updatedProperties: ITelemetryTrackProperties = {
|
||||
...properties,
|
||||
instance_id: instanceId,
|
||||
version_cli: N8N_VERSION,
|
||||
|
||||
Reference in New Issue
Block a user