mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 04:02:54 -06:00
fix: adjusts in telemetry
This commit is contained in:
parent
6f2971cf24
commit
83d88ad70a
@ -1,6 +1,8 @@
|
|||||||
SERVER_TYPE=http
|
SERVER_TYPE=http
|
||||||
SERVER_PORT=8080
|
SERVER_PORT=8080
|
||||||
SERVER_URL=http://localhost:8080
|
SERVER_URL=http://localhost:8080
|
||||||
|
# TELEMETRY=true
|
||||||
|
# TELEMETRY_URL=https://log.evolution-api.com/telemetry
|
||||||
|
|
||||||
CORS_ORIGIN=*
|
CORS_ORIGIN=*
|
||||||
CORS_METHODS=GET,POST,PUT,DELETE
|
CORS_METHODS=GET,POST,PUT,DELETE
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
* OwnerJid passed to typebot
|
* OwnerJid passed to typebot
|
||||||
* Function for openai assistant added
|
* Function for openai assistant added
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Adjusts in telemetry
|
||||||
|
|
||||||
# 2.0.7-rc (2024-08-03 14:04)
|
# 2.0.7-rc (2024-08-03 14:04)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
File diff suppressed because one or more lines are too long
2
manager/dist/index.html
vendored
2
manager/dist/index.html
vendored
@ -5,7 +5,7 @@
|
|||||||
<link rel="icon" type="image/png" href="/assets/images/evolution-logo.png" />
|
<link rel="icon" type="image/png" href="/assets/images/evolution-logo.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Evolution Manager</title>
|
<title>Evolution Manager</title>
|
||||||
<script type="module" crossorigin src="/assets/index-BRWhgzNI.js"></script>
|
<script type="module" crossorigin src="/assets/index-C__fF5dP.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-DZ0gaAHg.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DZ0gaAHg.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -10,14 +10,23 @@ export interface TelemetryData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const sendTelemetry = async (route: string): Promise<void> => {
|
export const sendTelemetry = async (route: string): Promise<void> => {
|
||||||
|
const enabled = process.env.TELEMETRY_ENABLED === undefined || process.env.TELEMETRY_ENABLED === 'true';
|
||||||
|
|
||||||
|
console.log('Telemetry enabled:', enabled);
|
||||||
|
if (!enabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const telemetry: TelemetryData = {
|
const telemetry: TelemetryData = {
|
||||||
route,
|
route,
|
||||||
apiVersion: `${packageJson.version}`,
|
apiVersion: `${packageJson.version}`,
|
||||||
timestamp: new Date(),
|
timestamp: new Date(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const url = process.env.TELEMETRY_URL || 'https://log.evolution-api.com/telemetry';
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.post('https://log.evolution-api.com/telemetry', telemetry)
|
.post(url, telemetry)
|
||||||
.then(() => {})
|
.then(() => {})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user