Skip to content

Observability and data sharing

LunarGate separates local metrics from optional cloud observability.

data_sharing also contains the remote_control toggle, which is related to the LunarGate Dashboard control plane on app.lunargate.ai rather than request-log export itself.

Default behavior

By default, the safe mode is metrics-only. Prompt and response bodies do not leave your infrastructure.

Data-sharing modes

Metrics-only mode

Use this when you want traffic visibility without exporting prompt content.

data_sharing:
  enabled: false
  share_prompts: false
  share_responses: false

Debug mode

Use this when you want request inspection in the LunarGate Dashboard on app.lunargate.ai.

data_sharing:
  enabled: true
  share_prompts: true
  share_responses: true
  backend_url: ${LUNARGATE_BACKEND_URL}
  api_key: ${LUNARGATE_GATEWAY_API_KEY}

Create that gateway API key in the Gateways section of app.lunargate.ai.

Prometheus endpoint

The gateway exposes metrics at:

GET /metrics

Health endpoint

Use the health check endpoint for container orchestration and smoke tests:

GET /health

What the LunarGate Dashboard receives

Depending on your config, the collector payload can include:

  • Request metadata and timing
  • Provider and model used
  • Token usage and estimated cost
  • Optional prompt content
  • Optional response content

Remote control

remote_control is the outbound control channel between a connected gateway and the LunarGate Dashboard on app.lunargate.ai.

Right now it is mainly used for the sandbox flow in the LunarGate Dashboard on app.lunargate.ai.

It is intentionally broader than that. The same channel is expected to become the foundation for automated A/B tests, controlled experiments, and other remote gateway-management features over time.

That means remote_control should be thought of separately from prompt/response sharing:

  • share_prompts and share_responses decide what request data leaves your environment
  • remote_control decides whether the gateway participates in the Dashboard control plane

If you want the gateway to stay entirely local from a control-plane perspective, keep remote_control: false.

Streaming nuance

When response sharing is enabled, the gateway can accumulate streamed chunks to reconstruct the final response object for downstream inspection.

For GET /v1/responses WebSocket mode, each response.create frame is still handled as a separate upstream request. If the client does not provide x-lunargate-sessionid, the gateway generates one automatically and reuses it across those requests for correlation.

Recommendation

Warning

Treat share_prompts and share_responses as explicit privacy decisions. Keep them disabled unless your team needs request-level debugging and understands what data is leaving the environment.