Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow Datadog integration to be disabled #323

Merged
merged 7 commits into from
Apr 3, 2024

Conversation

nhhagen
Copy link
Member

@nhhagen nhhagen commented Mar 22, 2024

Use a flag to determine if Datadog should be disabled using a flag rather than
relying on bad configuration.

This removes the need to check for bad configuration before starting Datadog in
services.

Closes: #306

@nhhagen nhhagen force-pushed the is-datadog-enabled-2024-03-18-23-10-05 branch 4 times, most recently from 7ff40c3 to 5650ffd Compare March 23, 2024 11:58
@nhhagen nhhagen force-pushed the is-datadog-enabled-2024-03-18-23-10-05 branch 6 times, most recently from 7c6254c to 4107e0a Compare March 26, 2024 12:04
@nhhagen nhhagen marked this pull request as ready for review March 26, 2024 12:04
@nhhagen nhhagen force-pushed the is-datadog-enabled-2024-03-18-23-10-05 branch from 4107e0a to 0a15fcc Compare March 26, 2024 12:06
internal/env.go Outdated Show resolved Hide resolved
Copy link
Member

@LinMAD LinMAD left a comment

Choose a reason for hiding this comment

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

Don't see big value in introducing this handling, if datadog must be disabled env vars can be not set or empty - simply. If Datadog not needed in the project, then must be removed from dependency.

internal/env.go Outdated Show resolved Hide resolved
@nhhagen
Copy link
Member Author

nhhagen commented Apr 2, 2024

Don't see big value in introducing this handling, if datadog must be disabled env vars can be not set or empty - simply. If Datadog not needed in the project, then must be removed from dependency.

@LinMAD The environment variable allows for deliberate control over the library rather than relying on "bad" configuration. This is valuable in testing to that you can disable the lib in a clear way and in production so that bad configuration causes an error and not a silent failure.

@nhhagen nhhagen force-pushed the is-datadog-enabled-2024-03-18-23-10-05 branch from ba73ff6 to a470ff1 Compare April 2, 2024 11:16
nhhagen added 4 commits April 2, 2024 14:10
Use a flag to determine if Datadog should be disabled using a flag rather than
relying on bad configuration.

This removes the need to check for bad configuration before starting Datadog in
services.

Closes: #306
@nhhagen nhhagen force-pushed the is-datadog-enabled-2024-03-18-23-10-05 branch from ef5e90a to 8b70a80 Compare April 2, 2024 12:11
testhelpers/config.go Outdated Show resolved Hide resolved
internal/env.go Outdated Show resolved Hide resolved
internal/env.go Show resolved Hide resolved
@policy-bot-coop-norge policy-bot-coop-norge bot requested a review from LinMAD April 2, 2024 13:17
@nhhagen nhhagen force-pushed the is-datadog-enabled-2024-03-18-23-10-05 branch from 45c34d8 to 39e0abe Compare April 2, 2024 13:33
@nhhagen
Copy link
Member Author

nhhagen commented Apr 3, 2024

@LinMAD waiting for you here

@nhhagen nhhagen merged commit 2c8bee0 into main Apr 3, 2024
16 checks passed
@nhhagen nhhagen deleted the is-datadog-enabled-2024-03-18-23-10-05 branch April 3, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for checking if Datadog integration is enabled
3 participants