Skip to content

Commit

Permalink
Update DISABLE_TELEMETRY and remove wip test
Browse files Browse the repository at this point in the history
  • Loading branch information
zwhitfield3 committed Apr 15, 2024
1 parent 88ec5dd commit 35f0849
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions packages/cli/src/global_telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const {version} = require('../package.json')

const root = path.resolve(__dirname, '../package.json')
const isDev = process.env.IS_DEV_ENVIRONMENT === 'true'
const isDisabled = process.env.DISABLE_TELEMETRY === 'true'
const canSendTelemetry = !isDisabled
const isTelemetryDisabled = process.env.DISABLE_TELEMETRY === 'true'
const canSendTelemetry = !isTelemetryDisabled

function getToken() {
const config = new Config({root})
Expand Down
13 changes: 0 additions & 13 deletions packages/cli/test/unit/global_telemetry.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,4 @@ describe('telemetry', async () => {
await telemetry.sendToRollbar(mockRollbarError)
rollbarAPI.done()
})

it('disables telemetry request from honeycomb and rollbar', async () => {
process.env.DISABLE_TELEMETRY = 'true'
const mockTelemetry = telemetry.setupTelemetry(mockConfig, mockOpts)
telemetry.initializeInstrumentation()

// const honeycombAPI = nock(`${isDev ? 'https://backboard-staging.herokuapp.com/otel' : 'https://backboard.heroku.com/otel'}`)
// .post('/v1/traces', identity)
// .reply(200)

await telemetry.sendTelemetry(mockTelemetry!)
// honeycombAPI.done()
})
})

0 comments on commit 35f0849

Please sign in to comment.