We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d8906d commit 4400045Copy full SHA for 4400045
src/insights.ts
@@ -1,5 +1,6 @@
1
import * as appInsights from "applicationinsights";
2
import * as https from "https";
3
+import * as http from "http";
4
import * as os from "os";
5
6
export class TelemetryClient implements appInsights.TelemetryClient {
@@ -35,10 +36,8 @@ export class TelemetryClient implements appInsights.TelemetryClient {
35
36
} catch (error) {}
37
38
try {
- const request = https.request({
39
- host: "v1.telemetry.coder.com",
40
- port: 443,
41
- path: "/track",
+ const url = process.env.TELEMETRY_URL || "https://v1.telemetry.coder.com/track";
+ const request = (/^http:/.test(url) ? http : https).request(url, {
42
method: "POST",
43
headers: {
44
"Content-Type": "application/json",
0 commit comments