Skip to content

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_key for gateway identity
  • general.backend_url for 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

data_sharing:
  enabled: true
  share_prompts: false
  share_responses: false

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:

data_sharing:
  gateway_lat: "52.2297"
  gateway_lon: "21.0122"

Remote control

If you want the gateway to participate in LunarGate remote control features, enable:

data_sharing:
  enabled: true
  remote_control: true

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, and X-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:

  • enabled is the master switch for Dashboard connectivity, including collector export and remote control
  • remote_control additionally 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_url usually does not need to be set manually.
  • Create the gateway in the Gateways section of app.lunargate.ai and export its LUNARGATE_GATEWAY_API_KEY when you enable this section.
  • Treat share_prompts and share_responses as privacy decisions, not just observability toggles.
  • Treat remote_control as 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.