Skip to content

Commit

Permalink
feat: stop sending metrics when CLI command is executed on CI/CD pipe…
Browse files Browse the repository at this point in the history
…line (asyncapi#10)

* Stop sending metrics when CLI command is executed on CI/CD pipeline

* Change env name for CI use case
  • Loading branch information
peter-rr authored Jan 30, 2024
1 parent d57655b commit 33759d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export default abstract class extends Command {

recorderFromEnv(prefix: string): Recorder {
let sink: Sink = new DiscardSink();
if (process.env.ASYNCAPI_METRICS !== 'false') {

if (process.env.ASYNCAPI_METRICS !== 'false' && process.env.CI !== 'true') {
switch (process.env.NODE_ENV) {
case 'development':
// NODE_ENV set to `development` in bin/run
Expand Down

0 comments on commit 33759d2

Please sign in to comment.