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

Fix telemetry manager health report #11397

Merged
merged 8 commits into from
Nov 30, 2023

Conversation

george-dorin
Copy link
Contributor

@george-dorin george-dorin commented Nov 28, 2023

Telemetry Manager's health report was checking the health of the endpoint instead of the telemetry client of the endpoint.

  • Removed service from endpoint
  • Change the telemetry manager health report to copy the health of the clients
  • Update the logger and service name to avoid collisions

Copy link
Contributor

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

Copy link
Contributor

I see that you haven't updated any README files. Would it make sense to do so?

@cedric-cordenier
Copy link
Contributor

@george-dorin Can you describe the problem in more detail please?

@george-dorin
Copy link
Contributor Author

@george-dorin Can you describe the problem in more detail please?

@cedric-cordenier updated the description with more details

@george-dorin george-dorin requested a review from jmank88 November 30, 2023 15:36
@@ -77,7 +77,7 @@ func NewTelemetryIngressBatchClient(url *url.URL, serverPubKeyHex string, ks key
serverPubKeyHex: serverPubKeyHex,
globalLogger: lggr,
logging: logging,
lggr: lggr.Named("TelemetryIngressBatchClient"),
lggr: lggr.Named(fmt.Sprintf("TelemetryIngressBatchClient.%s.%s", network, chainID)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we chain these calls in order to avoid assuming the separator is .?

Suggested change
lggr: lggr.Named(fmt.Sprintf("TelemetryIngressBatchClient.%s.%s", network, chainID)),
lggr: lggr.Named("TelemetryIngressBatchClient").Named(network).Named(chainID),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 2fecf65

chTelemetry: make(chan TelemPayload, telemBufferSize),
chDone: make(services.StopChan),
}
}

// Start connects the wsrpc client to the telemetry ingress server
func (tc *telemetryIngressClient) Start(ctx context.Context) error {
return tc.StartOnce("TelemetryIngressClient", func() error {
return tc.StartOnce(tc.lggr.Name(), func() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

These were actually OK as the short name. IIRC they are only used for the error, which ends up being logged through a named logger anyways.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 2fecf65

@george-dorin george-dorin requested a review from jmank88 November 30, 2023 15:57
@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate failed

Failed condition C Maintainability Rating on New Code (is worse than A)
Failed condition 11.11% Technical Debt Ratio on New Code (is greater than 4%)

See analysis details on SonarQube

Fix issues before they fail your Quality Gate with SonarLint SonarLint in your IDE.

@george-dorin george-dorin added this pull request to the merge queue Nov 30, 2023
Merged via the queue into develop with commit 31bf23a Nov 30, 2023
85 of 86 checks passed
@george-dorin george-dorin deleted the bug/BCF-2813-telemetry-manager-health branch November 30, 2023 17:33
fbac pushed a commit that referenced this pull request Dec 14, 2023
* Fix incorrect health report

* Add network and chainID to logger and service names

* Update helpers_test

* Update services name

* Remove unused

* Add changelog

* Implement feedback
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.

3 participants