-
Notifications
You must be signed in to change notification settings - Fork 4k
Extend host_config endpoint with metricsUrl configuration
#9611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bcffb14 to
af9cad7
Compare
host_config endpoint with metricsUrl configurationhost_config endpoint with metricsUrl configuration
44f54c5 to
d03fd06
Compare
c65ee7f to
bac9298
Compare
d03fd06 to
fb71c38
Compare
lukasmasuch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
| this.requestDefaultMetricsConfig() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We could set actuallySendMetrics to False here in case that this.metricsUrl is undefined after the requestDefaultMetricsConfig to ensure that metrics gathering gets deactivated. But it depends a bit on the full implementation if this is actually required.
bac9298 to
0890cbf
Compare
2a6dd1e to
5737410
Compare
**Metrics Migration Part 1**: This PR extends the `host_config` endpoint
to add a `metricsUrl`, which will serve as the destination URL for
metrics data.
`metricsUrl` for `host_config` endpoint will handle 4 options:
* **`"off"`**: Turns off metrics collection
* **`"<url>"`**: Sends metrics events to the passed URL
* _The logic to build/send event with necessary fields will be added in
a separate PR_
* **`"postMessage"`**: Sends metrics events via `postMessage` API
* _This logic will be added in a separate PR_
* **`" "`**: Default (OS) - telemetry destination url will be fetched
Should no url be received from the BE, the FE will attempt to fetch the
telemetry url from `data.streamlit.io/metrics.json`, caching it in
localStorage if successful. If there is no `metricsUrl`, no telemetry is
sent.
**Metrics Migration Part 3:** As a follow up to the metrics options in hostConfig endpoint (PR #9611), this PR adds the ability to send metrics events to the host via postMessage API using our existing Host <-> Guest communication.
Describe your changes
Metrics Migration Part 1: This PR extends the
host_configendpoint to add ametricsUrl, which will serve as the destination URL for metrics data.metricsUrlforhost_configendpoint will handle 4 options:"off": Turns off metrics collection"<url>": Sends metrics events to the passed URL"postMessage": Sends metrics events viapostMessageAPI" ": Default (OS) - telemetry destination url will be fetchedShould no url be received from the BE, the FE will attempt to fetch the telemetry url from
data.streamlit.io/metrics.json, caching it in localStorage if successful. If there is nometricsUrl, no telemetry is sent.Note: Currently using a test Fivetran Webhook
Testing Plan