You can configure the Relay Proxy to export statistics and route traces to Datadog, Stackdriver, and Prometheus. To learn about the available settings for each of these options, read Configuration.
The Relay Proxy supports the following metrics:
connections
: The number of currently existing stream connections from SDKs to the Relay Proxy.newconnections
: The cumulative number of stream connections that have been made to the Relay Proxy since it started up.requests
: The cumulative number of requests received by all of the Relay Proxy's service endpoints (except for the status endpoint) since it started up.
You can filter metrics by the following tags:
platformCategory
: The kind of SDK that the metric was generated by. The value of this tag can be:server
: A server-side SDK.mobile
: A client-side SDK that uses the mobile key in its requests. This includes SDKs that run on a mobile device, as well as some other devices and desktop platforms such as the client-side C/C++ SDK.browser
: A client-side SDK that is implemented in JavaScript and uses the client-side ID in its requests. This includes the browser-based Javascript SDK and React SDK, as well as others like client-side Node.js and Electron.
env
: The name of the LaunchDarkly environment. This is whatever name you gave to the environment in the configuration file, or, if you are using automatic configuration mode or offline mode, it is the actual name of the project and environment in LaunchDarkly. Example:MyApplication Staging
route
: The request URL path. This can be any of the endpoint paths described in Service endpoints exactly as written there, so variables like{user}
will appear as a placeholder rather than showing the actual value. Example:/sdk/evalx/{envId}/users/{user}
method
: The HTTP method used for the request. Example:GET
userAgent
: The user agent used to make the request, typically a LaunchDarkly SDK version. Example: "Node/3.4.0"
Note: Traces for stream connections will trace until the connection is closed.
If you are using Prometheus, make sure your Prometheus configuration has a scrape_configs
section defining the Relay Proxy as an endpoint. For instance, if the Relay Proxy is configured to expose Prometheus metrics on the default port of 8031:
scrape_configs:
- job_name: 'ld-relay'
scrape_interval: 10s
static_configs:
- targets: ['localhost:8031']