mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
feat: Update telemetry api endpoints (#5482)
* feat: update PostHog api endpoint * feat: update rs host * feat: update rs host * feat: update rs endpoints * refactor: use api host for BE events as well
This commit is contained in:
parent
00ac4c308a
commit
3de49e8f78
|
@ -1039,7 +1039,7 @@ export const schema = {
|
||||||
apiHost: {
|
apiHost: {
|
||||||
doc: 'API host for PostHog',
|
doc: 'API host for PostHog',
|
||||||
format: String,
|
format: String,
|
||||||
default: 'https://app.posthog.com',
|
default: 'https://ph.n8n.io',
|
||||||
env: 'N8N_DIAGNOSTICS_POSTHOG_API_HOST',
|
env: 'N8N_DIAGNOSTICS_POSTHOG_API_HOST',
|
||||||
},
|
},
|
||||||
disableSessionRecording: {
|
disableSessionRecording: {
|
||||||
|
|
|
@ -60,7 +60,9 @@ export class Telemetry {
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||||
const { PostHog } = await import('posthog-node');
|
const { PostHog } = await import('posthog-node');
|
||||||
this.postHog = new PostHog(config.getEnv('diagnostics.config.posthog.apiKey'));
|
this.postHog = new PostHog(config.getEnv('diagnostics.config.posthog.apiKey'), {
|
||||||
|
host: config.getEnv('diagnostics.config.posthog.apiHost'),
|
||||||
|
});
|
||||||
|
|
||||||
this.startPulse();
|
this.startPulse();
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@ export class Telemetry {
|
||||||
this.initRudderStack(key, url, {
|
this.initRudderStack(key, url, {
|
||||||
integrations: { All: false },
|
integrations: { All: false },
|
||||||
loadIntegration: false,
|
loadIntegration: false,
|
||||||
|
configUrl: 'https://api-rs.n8n.io',
|
||||||
...logging,
|
...logging,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -253,7 +254,7 @@ export class Telemetry {
|
||||||
|
|
||||||
script.type = 'text/javascript';
|
script.type = 'text/javascript';
|
||||||
script.async = !0;
|
script.async = !0;
|
||||||
script.src = 'https://cdn.rudderlabs.com/v1/rudder-analytics.min.js';
|
script.src = 'https://cdn-rs.n8n.io/v1/ra.min.js';
|
||||||
|
|
||||||
const element: Element = document.getElementsByTagName('script')[0];
|
const element: Element = document.getElementsByTagName('script')[0];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue