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

relayproxy: Add the possibility to have 2 differents port for metrics and business #1502

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

thomaspoignant
Copy link
Owner

Description

Following issue #1499, this PR introduces the possibility of running metrics and health checks on different ports.
This is a requirement for some companies that prefer not to mix the 2 things simultaneously.

In this implementation, we are starting another instance of echo for the metrics if the param monitoringPort is set in the configuration.
If this option is not set the monitoring will continue to work on the same port of the business logic.

Changes include

  • New feature (non-breaking change that adds functionality)

Closes issue(s)

Resolve #1499

Checklist

  • I have tested this code
  • I have added unit test to cover this code
  • I have updated the documentation (README.md and /website/docs)
  • I have followed the contributing guide

Copy link

netlify bot commented Feb 2, 2024

Deploy Preview for go-feature-flag-doc-preview ready!

Name Link
🔨 Latest commit 179e15c
🔍 Latest deploy log https://app.netlify.com/sites/go-feature-flag-doc-preview/deploys/65bcc149e8b5390008203793
😎 Deploy Preview https://deploy-preview-1502--go-feature-flag-doc-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (c659e2a) 88.36% compared to head (179e15c) 87.67%.

Files Patch % Lines
cmd/relayproxy/api/server.go 84.21% 6 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1502      +/-   ##
==========================================
- Coverage   88.36%   87.67%   -0.70%     
==========================================
  Files          75       77       +2     
  Lines        3498     3626     +128     
==========================================
+ Hits         3091     3179      +88     
- Misses        332      364      +32     
- Partials       75       83       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Thomas Poignant <[email protected]>
Copy link

sonarcloud bot commented Feb 2, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@thomaspoignant thomaspoignant merged commit a313516 into main Feb 2, 2024
18 of 21 checks passed
@thomaspoignant thomaspoignant deleted the feat-1499 branch February 2, 2024 10:27
thomaspoignant added a commit that referenced this pull request Feb 2, 2024
@thomaspoignant thomaspoignant mentioned this pull request Feb 2, 2024
4 tasks
thomaspoignant added a commit that referenced this pull request Feb 2, 2024
* Revert "relayproxy: Add the possibility to have 2 differents port for metrics and business (#1502)"

This reverts commit a313516.

* Fixing some issue in the multiport setup that broke the integration tests

Signed-off-by: Thomas Poignant <[email protected]>

* Fix close

Signed-off-by: Thomas Poignant <[email protected]>

---------

Signed-off-by: Thomas Poignant <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
thomaspoignant added a commit that referenced this pull request Sep 5, 2024
… and business (#1502)

* Add the possibility to have 2 differents port for metrics and the rest

Signed-off-by: Thomas Poignant <[email protected]>

* Add documentation

Signed-off-by: Thomas Poignant <[email protected]>

---------

Signed-off-by: Thomas Poignant <[email protected]>
thomaspoignant added a commit that referenced this pull request Sep 5, 2024
* Revert "relayproxy: Add the possibility to have 2 differents port for metrics and business (#1502)"

This reverts commit a313516.

* Fixing some issue in the multiport setup that broke the integration tests

Signed-off-by: Thomas Poignant <[email protected]>

* Fix close

Signed-off-by: Thomas Poignant <[email protected]>

---------

Signed-off-by: Thomas Poignant <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
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.

(feature) Being able to configure a different port for Metrics / Health Check
1 participant