data_sharing¶
The data_sharing section controls collector export and the optional remote-control connection to the LunarGate Dashboard on app.lunargate.ai.
By default, LunarGate is zero-leakage with respect to ordinary client prompt and response content: those bodies do not leave your infrastructure unless you explicitly enable collector sharing. Remote-control sandbox traffic is a separate content path described below.
This section is also hot-reloadable. Updating data-sharing config reconciles the in-process collector and remote-control client without restarting the gateway.
Fields¶
| Field | Type | Default | Notes |
|---|---|---|---|
enabled |
bool | false |
master switch for Dashboard forwarding |
share_prompts |
bool | false |
forward prompt content |
share_responses |
bool | false |
forward response content |
gateway_lat |
string | empty | optional latitude for live flow map |
gateway_lon |
string | empty | optional longitude for live flow map |
remote_control |
bool | false |
enable remote-control websocket/sandbox flow |
Shared control-plane settings live in top-level general:
general.api_keyfor gateway identitygeneral.backend_urlfor the collector and remote-control base URL
When data_sharing.enabled is true, general.api_key must resolve to a non-empty value and general.backend_url must be a valid HTTP(S) base URL. remote_control: true with enabled: false is rejected rather than accepted as an inactive, misleading configuration. These checks run both at startup and during hot reload; an invalid reload leaves the last valid runtime configuration active.
Collector failures are logged with a status classification only. Response bodies returned by the Dashboard backend are not copied into gateway diagnostics, where they could expose backend details or credentials.
Metrics-only mode¶
This exports request metrics and timing to the LunarGate Dashboard without exporting ordinary client prompt or response bodies. Set enabled: false if you want to keep collector observability local to the gateway's /metrics endpoint.
Metrics still contain the documented identity, routing, timing, usage, and fixed metadata allowlist. The exact fields and privacy boundary are listed in Observability and data sharing. Metrics-only failures use a bounded error class rather than provider-supplied error text.
Automatic release checks are configured separately under update_check. Disabling data_sharing does not disable the default update check.
Debug / request-inspection mode¶
general:
api_key: "${LUNARGATE_GATEWAY_API_KEY}"
backend_url: "${LUNARGATE_BACKEND_URL}" # optional override
data_sharing:
enabled: true
share_prompts: true
share_responses: true
Create that key in the Gateways section of app.lunargate.ai.
Flow map / geo tags¶
If you use the live flow map in the dashboard, you can also set:
Remote control¶
If you want the gateway to participate in LunarGate remote control features, enable:
remote_control is the gateway's outbound control-plane channel to the LunarGate Dashboard on app.lunargate.ai.
Today it is primarily used for the sandbox flow exposed by the LunarGate Dashboard on app.lunargate.ai.
Each sandbox execution is a separate, explicit content exchange over that control channel:
- the Dashboard sends the complete sandbox request to the gateway
- the gateway sends the complete sandbox response body back to the Dashboard, up to a 16 MiB limit
- the returned header allowlist is
Content-Type,X-LunarGate-Request-ID,X-LunarGate-Provider,X-LunarGate-Model, andX-LunarGate-Route
This exchange happens regardless of share_prompts and share_responses. Those flags govern collector export for ordinary client traffic; they do not redact remote-control sandbox commands or results. Consequently, metrics-only collector settings combined with remote_control: true are not content-free for sandbox traffic.
The intended scope is wider than that: over time, the same control channel is expected to support automated A/B tests, controlled experiments, and other remote orchestration capabilities that act on a connected gateway without changing the client-facing API shape.
In other words:
enabledis the master switch for Dashboard connectivity, including collector export and remote controlremote_controladditionally opts the gateway into the Dashboard control channel
When enabled, remote_control, general.backend_url, or general.api_key change, the gateway reconnects or reconfigures the in-process Dashboard clients with the new settings. Remote control is active only when both enabled and remote_control are true and the shared control-plane settings are complete. Incomplete or contradictory combinations are rejected during configuration validation.
Streaming nuance¶
When share_responses: true, the gateway can accumulate streamed chunks so it can reconstruct a final response object for downstream request inspection.
Practical guidance¶
- Keep prompt/response sharing off unless your team explicitly wants request inspection in the LunarGate Dashboard on
app.lunargate.ai. general.backend_urlusually does not need to be set manually.- Create the gateway in the
Gatewayssection of app.lunargate.ai and export itsLUNARGATE_GATEWAY_API_KEYwhen you enable this section. - Treat
share_promptsandshare_responsesas privacy decisions, not just observability toggles. - Treat
remote_controlas joining a Dashboard-managed control plane, not just turning on another metrics feature. - If you toggle this section live, verify the gateway logs once so you can see whether collector export and remote control are actually enabled with the resolved values.