A side-panel log viewer that reads logs live from the OpenSearch Dashboards
search API instead of a CSV/JSON file. It captures the response of the
opensearch-with-long-numerals request that OSD makes when you run a search,
parses each hit's _source (which carries either json_payload or
text_payload), and renders it with the same explorer UI as the web app.
- Open
chrome://extensions - Enable Developer mode (top-right)
- Click Load unpacked and select this
extension/folder
- Open OpenSearch Dashboards at
https://logging-nonprd.gcp.ktbapp.tech - Click the extension's toolbar icon to open the side panel
- Run/refresh a search in Discover — results stream into the panel automatically
The connection dot turns green once results are received.
| File | World | Role |
|---|---|---|
interceptor.js |
MAIN | Patches fetch/XHR, captures the search response |
relay.js |
ISOLATED | Forwards the captured JSON to the background |
background.js |
service worker | Stores data per-tab, scopes the side panel to OSD tabs |
parser.js |
side panel | Parses rawResponse.hits.hits[]._source → log entries |
sidepanel.{html,css,js} |
side panel | The explorer UI |
There is no global side panel (the manifest deliberately omits
side_panel.default_path). At startup the panel is disabled globally, then
enabled only on OSD tabs (logging-nonprd.gcp.ktbapp.tech) via per-tab
chrome.sidePanel.setOptions. This is what stops the panel from "following" you
to unrelated tabs — a global panel persists window-wide once opened, but a
per-tab panel is closed by Chrome when you switch to a tab where it's disabled.
Captured data is keyed by tab id, and the panel only ever reads its own tab's
data.
After updating the extension, reload it from
chrome://extensionsand reopen the panel so the new (non-global) configuration takes effect.
The extension works on both environments:
https://logging-nonprd.gcp.ktbapp.techhttps://logging-prd.gcp.ktbapp.tech
To add or change a host, update all three places (then reload the extension):
manifest.json→host_permissionsand bothcontent_scripts[].matchesbackground.js→OSD_HOSTSsidepanel.js→OSD_HOSTS