mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-02-14 23:19:37 +00:00
Include Docker storage driver in Sentry reports (#6529)
Add the Docker storage driver (e.g., overlay2, vfs) to the context information sent with Sentry error reports. This helps correlate issues with specific storage backends and improves debugging of Docker-related problems. The storage driver is now included in both SETUP and RUNNING state error reports under contexts.docker.storage_driver. Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -72,6 +72,9 @@ def filter_data(coresys: CoreSys, event: Event, hint: Hint) -> Event | None:
|
||||
"docker": coresys.docker.info.version,
|
||||
"supervisor": coresys.supervisor.version,
|
||||
},
|
||||
"docker": {
|
||||
"storage_driver": coresys.docker.info.storage,
|
||||
},
|
||||
"host": {
|
||||
"machine": coresys.machine,
|
||||
},
|
||||
@@ -111,6 +114,9 @@ def filter_data(coresys: CoreSys, event: Event, hint: Hint) -> Event | None:
|
||||
"docker": coresys.docker.info.version,
|
||||
"supervisor": coresys.supervisor.version,
|
||||
},
|
||||
"docker": {
|
||||
"storage_driver": coresys.docker.info.storage,
|
||||
},
|
||||
"resolution": {
|
||||
"issues": [attr.asdict(issue) for issue in coresys.resolution.issues],
|
||||
"suggestions": [
|
||||
|
||||
@@ -121,10 +121,15 @@ async def test_not_started(coresys):
|
||||
assert "versions" in filtered["contexts"]
|
||||
assert "docker" in filtered["contexts"]["versions"]
|
||||
assert "supervisor" in filtered["contexts"]["versions"]
|
||||
assert "docker" in filtered["contexts"]
|
||||
assert "storage_driver" in filtered["contexts"]["docker"]
|
||||
assert "host" in filtered["contexts"]
|
||||
assert "machine" in filtered["contexts"]["host"]
|
||||
assert filtered["contexts"]["versions"]["docker"] == coresys.docker.info.version
|
||||
assert filtered["contexts"]["versions"]["supervisor"] == coresys.supervisor.version
|
||||
assert (
|
||||
filtered["contexts"]["docker"]["storage_driver"] == coresys.docker.info.storage
|
||||
)
|
||||
assert filtered["contexts"]["host"]["machine"] == coresys.machine
|
||||
|
||||
|
||||
@@ -142,6 +147,9 @@ async def test_defaults(coresys):
|
||||
assert filtered["contexts"]["versions"]["supervisor"] == AwesomeVersion(
|
||||
SUPERVISOR_VERSION
|
||||
)
|
||||
assert (
|
||||
filtered["contexts"]["docker"]["storage_driver"] == coresys.docker.info.storage
|
||||
)
|
||||
assert filtered["user"]["id"] == coresys.machine_id
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user