mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00
fix: adjusts in telemetry
This commit is contained in:
parent
6f2971cf24
commit
83d88ad70a
@ -1,6 +1,8 @@
|
||||
SERVER_TYPE=http
|
||||
SERVER_PORT=8080
|
||||
SERVER_URL=http://localhost:8080
|
||||
# TELEMETRY=true
|
||||
# TELEMETRY_URL=https://log.evolution-api.com/telemetry
|
||||
|
||||
CORS_ORIGIN=*
|
||||
CORS_METHODS=GET,POST,PUT,DELETE
|
||||
|
@ -6,6 +6,10 @@
|
||||
* OwnerJid passed to typebot
|
||||
* Function for openai assistant added
|
||||
|
||||
### Fixed
|
||||
|
||||
* Adjusts in telemetry
|
||||
|
||||
# 2.0.7-rc (2024-08-03 14:04)
|
||||
|
||||
### 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" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
|
@ -10,14 +10,23 @@ export interface TelemetryData {
|
||||
}
|
||||
|
||||
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 = {
|
||||
route,
|
||||
apiVersion: `${packageJson.version}`,
|
||||
timestamp: new Date(),
|
||||
};
|
||||
|
||||
const url = process.env.TELEMETRY_URL || 'https://log.evolution-api.com/telemetry';
|
||||
|
||||
axios
|
||||
.post('https://log.evolution-api.com/telemetry', telemetry)
|
||||
.post(url, telemetry)
|
||||
.then(() => {})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user