Skip to content

Commit

Permalink
BOT-3711 analytics host + port
Browse files Browse the repository at this point in the history
  • Loading branch information
codeforequity-at committed Mar 2, 2023
1 parent fdd0a03 commit c14ab50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions report.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const path = require('path')
const os = require('os')
const localDevPort = process.env.BOTIUM_ANALYTICS_LOCAL_PORT
const https = localDevPort ? require('http') : require('https')

const botiumAnalyticsHost = localDevPort ? 'localhost' : (process.env.BOTIUM_ANALYTICS_HOST || 'v1.license.botium.cyaraportal.us')
const botiumAnalyticsHost = process.env.BOTIUM_ANALYTICS_HOST || 'v1.license.botium.cyaraportal.us'
const botiumAnalyticsPort = process.env.BOTIUM_ANALYTICS_PORT || 443
const https = botiumAnalyticsPort === 443 ? require('https') : require('http')
const execTimeout = 10000

function logIfVerbose (toLog, stream) {
Expand All @@ -29,7 +29,7 @@ async function reportPostInstall () {

const reqOptions = {
host: botiumAnalyticsHost,
port: localDevPort || 443,
port: botiumAnalyticsPort,
method: 'POST',
path: '/metrics/installation/core',
headers: {
Expand Down
8 changes: 4 additions & 4 deletions src/metrics.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const path = require('path')
const os = require('os')
const localDevPort = process.env.BOTIUM_ANALYTICS_LOCAL_PORT
const https = localDevPort ? require('http') : require('https')

const botiumAnalyticsHost = localDevPort ? 'localhost' : (process.env.BOTIUM_ANALYTICS_HOST || 'v1.license.botium.cyaraportal.us')
const botiumAnalyticsHost = process.env.BOTIUM_ANALYTICS_HOST || 'v1.license.botium.cyaraportal.us'
const botiumAnalyticsPort = process.env.BOTIUM_ANALYTICS_PORT || 443
const https = botiumAnalyticsPort === 443 ? require('https') : require('http')
const execTimeout = 10000

function logIfVerbose (toLog, stream) {
Expand All @@ -29,7 +29,7 @@ async function reportUsage (metrics) {

const reqOptions = {
host: botiumAnalyticsHost,
port: localDevPort || 443,
port: botiumAnalyticsPort,
method: 'POST',
path: '/metrics/usage/core',
headers: {
Expand Down

0 comments on commit c14ab50

Please sign in to comment.