Skip to content

#144 Create feature toggles to enable/disable metrics - #147

Merged
henrybley merged 1 commit into
mainfrom
henry/toggle-features
May 23, 2024
Merged

henrybley merged 1 commit into
mainfrom
henry/toggle-features

Conversation

@henrybley

Copy link
Copy Markdown
Contributor

implemented the togglz library to be able to turn on/off features based off .env variables

@tomellm tomellm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just check the two comments, otherwise looks good to me

Comment thread .env-template
Comment on lines +6 to +12
export APP_GITHUB_APPLICATION_PEM=""
export EXPORTER_JOBS_FEATURE=false
export EXPORTER_WORKFLOW_RUNS_FEATURE=false
export EXPORTER_WORKFLOW_RUN_BUILD_TIMES_FEATURE=false
export EXPORTER_SELF_HOSTED_RUNNERS_EXPORTER=false
export EXPORTER_REPOSITORIES_FEATURE=false
export EXPORTER_PULL_REQUESTS_FEATURE=false No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all disabled by default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I prefer them all off

Comment on lines +34 to +43
EXPORTER_JOBS_FEATURE:
enabled: ${EXPORTER_JOBS_FEATURE:false}
EXPORTER_WORKFLOW_RUNS_FEATURE:
enabled: ${EXPORTER_WORKFLOW_RUNS_FEATURE:false}
EXPORTER_SELF_HOSTED_RUNNERS_EXPORTER:
enabled: ${EXPORTER_SELF_HOSTED_RUNNERS_EXPORTER:false}
EXPORTER_REPOSITORIES_FEATURE:
enabled: ${EXPORTER_REPOSITORIES_FEATURE:false}
EXPORTER_PULL_REQUESTS_FEATURE:
enabled: ${EXPORTER_PULL_REQUESTS_FEATURE:false}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still wonder if everything should be turned off or if maybe the most basic ones like Repositories and WorkflowRuns should be turned on?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again yeah I'd rather have all off and let the end user decide which features to turn on

implemented the togglz library to be able to turn on/off features based off .env variables
@henrybley
henrybley force-pushed the henry/toggle-features branch from fcee066 to 53adde3 Compare May 23, 2024 12:26
@sonarqubecloud

Copy link
Copy Markdown

@henrybley
henrybley merged commit 2cc6edc into main May 23, 2024
@henrybley
henrybley deleted the henry/toggle-features branch May 23, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants