Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 607f573. Configure here.
| if t.get("key") | ||
| } | ||
| severity = SkywalkingProvider._map_severity(tags.get("level", "warning")) | ||
| service_name = scope_data.get("service", event.get("name", "unknown")) |
There was a problem hiding this comment.
Webhook _format_alert crashes on string scope field
High Severity
In _format_alert, scope_data = event.get("scope", {}) retrieves the scope field, then scope_data.get("service", ...) is called on it. However, the webhook_example() in the same file shows "scope": "SERVICE" — a string, not a dict. Calling .get() on a string raises an AttributeError, crashing all webhook-based alarm processing. The GraphQL query in _get_alerts returns scope as a structured object, but the webhook format uses a plain string.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 607f573. Configure here.
| return data.get("getGlobalTopology", {}) | ||
| except Exception as e: | ||
| logger.error(f"Failed to fetch SkyWalking topology: {e}") | ||
| return {} |
There was a problem hiding this comment.
Return type annotation mismatches actual return value
Low Severity
_get_topology is annotated as returning list[dict] but actually returns a dict (from data.get("getGlobalTopology", {})) on success, and {} on error. Any caller iterating over the result expecting a list of dicts would get unexpected behavior — iterating over dict keys instead of dict items.
Reviewed by Cursor Bugbot for commit 607f573. Configure here.
| service=service_name, | ||
| lastReceived=datetime.datetime.utcnow().isoformat(), | ||
| tags=tags, | ||
| fingerprint=f"skywalking-{event.get('id', '')}", |
There was a problem hiding this comment.
Webhook fingerprint missing id0 fallback causes deduplication collapse
High Severity
In _format_alert, the id field correctly falls back to id0 via event.get("id", event.get("id0", "")), but the fingerprint field only checks event.get('id', '') without the same fallback. SkyWalking webhook payloads use id0 (not id), as shown by the webhook_example() in the same file. This means all webhook-sourced alerts get fingerprint "skywalking-", collapsing them into a single deduplicated alert.
Reviewed by Cursor Bugbot for commit 607f573. Configure here.
…x topology return type - _format_alert: scope can be string (webhook) or dict (GraphQL), handle both - fingerprint: add id0 fallback matching the id field behavior - _get_topology: fix return type annotation from list[dict] to dict Addresses Cursor Bugbot review feedback.
|
You have used all of your free Bugbot PR reviews. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
I have read the CLA Document and I hereby sign the CLA |
|
@CLAassistant check |
|
/check-cla |


Closes #5487
New Provider: Apache SkyWalking
Adds a provider for Apache SkyWalking, an open-source APM system for distributed systems, cloud-native architectures, and containers.
Features:
Auth Config:
hostusernamepasswordScopes:
read_alerts(required) — Read alarms/alertsread_topology(optional) — Read service topologyFiles:
keep/providers/skywalking_provider/skywalking_provider.py— Provider implementationkeep/providers/skywalking_provider/__init__.py— Package initkeep/providers/skywalking_provider/README.md— DocumentationWebhook Example:
Included
webhook_example()for SkyWalking alarm webhook format.Severity Mapping:
Note
Medium Risk
Adds a new external integration that performs outbound GraphQL requests and maps webhook payloads into alerts; main risk is API/query compatibility and error-handling around network/auth failures rather than changes to existing core flows.
Overview
Adds a new
skywalking_providerpackage implementing an Apache SkyWalking integration.The provider introduces auth/config schema (
host+ optional basic auth), scope validation via lightweight GraphQL queries, alert ingestion by queryinggetAlarm(with severity mapping), optional topology retrieval viagetGlobalTopology, and a webhook formatter/example for SkyWalking alarm payloads. Includes provider-specific README documentation and setup guidance.Reviewed by Cursor Bugbot for commit 607f573. Bugbot is set up for automated code reviews on this repo. Configure here.