-
Notifications
You must be signed in to change notification settings - Fork 5
feat: improve telemetry ISE logging and diagnostics #100
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -26,6 +26,7 @@ import ( | |||||
| "strings" | ||||||
|
|
||||||
| ru "github.com/rdkcentral/xconfwebconfig/rulesengine" | ||||||
| log "github.com/sirupsen/logrus" | ||||||
|
|
||||||
| queries "github.com/rdkcentral/xconfadmin/adminapi/queries" | ||||||
| xcommon "github.com/rdkcentral/xconfadmin/common" | ||||||
|
|
@@ -66,6 +67,7 @@ func DeleteTelemetryRulebyId(id string, app string) *xwhttp.ResponseEntity { | |||||
|
|
||||||
| err = DeleteOneTelemetryRule(id) | ||||||
| if err != nil { | ||||||
| log.WithFields(log.Fields{"entity_id": id, "error": err}).Error("Failed to delete telemetry rule") | ||||||
|
||||||
| log.WithFields(log.Fields{"entity_id": id, "error": err}).Error("Failed to delete telemetry rule") | |
| log.WithFields(log.Fields{"entity_id": id, "app": app, "error": err}).Error("Failed to delete telemetry rule") |
Copilot
AI
Apr 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve triage across tenants/environments, consider including app/ApplicationType as a structured field in this error log (it is available as a parameter here).
Copilot
AI
Apr 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve triage across tenants/environments, consider including app/ApplicationType as a structured field in this error log (it is available as a parameter here).
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -170,6 +170,7 @@ func GetTelemetryTwoRulesFilteredWithPage(w http.ResponseWriter, r *http.Request | |||||||
| } | ||||||||
| xw, ok := w.(*xwhttp.XResponseWriter) | ||||||||
| if !ok { | ||||||||
| log.Error("Failed to cast response writer to XResponseWriter in GetTelemetryTwoRulesFilteredWithPage") | ||||||||
|
||||||||
| log.Error("Failed to cast response writer to XResponseWriter in GetTelemetryTwoRulesFilteredWithPage") | |
| log.WithField("writer_type", fmt.Sprintf("%T", w)). | |
| Error("Unable to cast responsewriter to XResponseWriter in GetTelemetryTwoRulesFilteredWithPage") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This log message starts with a lowercase "failed" and differs from the other cast-failure messages ("Unable to cast responsewriter...") used in nearby telemetry handlers. Standardizing casing/wording makes grepping and alerting on these diagnostics more reliable.