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

refactor(config): add independent toggles for enabling traces and metrics #1020

Merged
merged 3 commits into from
May 3, 2023

Conversation

SanchithHegde
Copy link
Member

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This PR adds two configuration variables for toggling traces and metrics independently instead of using a single toggle to enable both. In addition, this PR introduces one more configuration variable to ignore errors during traces and metrics setup, if required.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

The log.telemetry.enabled configuration variable is no longer being used, the log.telemetry.traces_enabled and log.telemetry.metrics_enabled configuration variables must be used instead for toggling traces and metrics, respectively. In addition, errors during traces or metrics setup can be ignored using the log.telemetry.ignore_errors configuration variable.

Motivation and Context

This would allow us to have metrics and traces independently enabled, as required.

How did you test it?

Manually.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@SanchithHegde SanchithHegde added A-framework Area: Framework S-waiting-on-review Status: This PR has been implemented and needs to be reviewed M-configuration-changes Metadata: This PR involves configuration changes C-refactor Category: Refactor labels Apr 28, 2023
@SanchithHegde SanchithHegde self-assigned this Apr 28, 2023
Copy link
Member

@lsampras lsampras left a comment

Choose a reason for hiding this comment

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

I wonder if we should update the config structure here as well...

currently we have
telmetry

I think the below could be a better representation...
tel-new

crates/router_env/src/logger/setup.rs Show resolved Hide resolved
crates/router_env/src/logger/setup.rs Show resolved Hide resolved
@SanchithHegde SanchithHegde added R-waiting-on-L2 Review: Waiting on L2 reviewer R-L1-completed Review: L1 Review completed labels May 2, 2023
@SanchithHegde
Copy link
Member Author

I wonder if we should update the config structure here as well...

currently we have telmetry

I think the below could be a better representation... tel-new

I'd prefer to take this up in a separate PR.

@jarnura jarnura added S-ready-for-merge and removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed R-waiting-on-L2 Review: Waiting on L2 reviewer labels May 2, 2023
@jarnura jarnura added this pull request to the merge queue May 2, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 3, 2023
@SanchithHegde SanchithHegde added this pull request to the merge queue May 3, 2023
Merged via the queue into main with commit af71828 May 3, 2023
@SanchithHegde SanchithHegde deleted the independent-toggles-traces-metrics branch May 3, 2023 07:16
@SanchithHegde SanchithHegde removed R-L1-completed Review: L1 Review completed S-ready-for-merge labels May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-framework Area: Framework C-refactor Category: Refactor M-configuration-changes Metadata: This PR involves configuration changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants