Skip to content
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

[APM] Add setting to specify default environment #126091

Closed
2 tasks
sorenlouv opened this issue Feb 21, 2022 · 14 comments · Fixed by #126151
Closed
2 tasks

[APM] Add setting to specify default environment #126091

sorenlouv opened this issue Feb 21, 2022 · 14 comments · Fixed by #126151
Assignees
Labels
apm:performance APM UI - Performance Work apm:service-inventory apm:test-plan-done Pull request that was successfully tested during the test plan Team:APM All issues that need APM UI Team support v8.2.0

Comments

@sorenlouv
Copy link
Member

sorenlouv commented Feb 21, 2022

Related to elastic/apm-server#4468
Related to: #126100

Currently the UI defaults to showing data across all environments. This creates a bad initial experience since mixing environments creates unexpected results. ML jobs are restricted to specific environments so won't show up in this case. Additionally querying across all environments can be very slow, if there are many environments with lots of data.
To solve this we should make it possible for users to specify a default environment.

TODO:

  • Kibana Advanced Setting: Add a setting to specify the default environment
  • Service Inventory Page: If no environment is selected, default to the environment specified in Advanced Settings
@sorenlouv sorenlouv added the Team:APM All issues that need APM UI Team support label Feb 21, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@formgeist
Copy link
Contributor

@sqren What happens if the user hasn't set a default environment? Are we setting it to production by default? How does this work with Service groups?

IMO, I still think we need to figure this out in a more dynamic way or where we default to production from the start. Also I'd refrain from adding more callouts on the Inventory page.

@dannycroft
Copy link

@chrisdistasio @alex-fedotyev are there any specific telemetry requirements you would want here?

@kpatticha
Copy link
Contributor

kpatticha commented Feb 21, 2022

At this point, will we keep the All option?

@sorenlouv
Copy link
Member Author

At this point, will we keep the All option?

Yes, All option stays. The idea is to make it possible for users to have a primary environment that they filter on by default.

@sqren What happens if the user hasn't set a default environment? Are we setting it to production by default? How does this work with Service groups?

As we discussed, the idea was to default to All environments (like today) if no default environment is specified. But I'm open to defaulting to a specific environment (eg. "production"). This would be a very user-facing change but it would also add value up front.

@dgieselaar
Copy link
Member

@sqren I have a draft PR open at #126151. I'm not sure anymore though what plans we had for the callout - should I add or do we leave it (for now)?

@sorenlouv
Copy link
Member Author

sorenlouv commented Feb 22, 2022

@sqren I have a draft PR open at #126151. I'm not sure anymore though what plans we had for the callout - should I add or do we leave it (for now)?

I'd say leave it out for now. Then we can at least get the setting merged in and ready for 8.2.

@chrisdistasio
Copy link

@sqren, at what level is the setting set/persisted? is it at a global level; space level, service group level, user level? i imagine some users might desire a different default than their colleagues.

@dannycroft from a telemetry perspective it would be good to know whether a customer has configured the setting and what the default has been configured to.

cc: @alex-fedotyev

@sorenlouv
Copy link
Member Author

@sqren, at what level is the setting set/persisted? is it at a global level; space level, service group level, user level? i imagine some users might desire a different default than their colleagues.

Advanced settings are space level. User level would be great but that's a feature request for the kibana platform.

@dannycroft from a telemetry perspective it would be good to know whether a customer has configured the setting and what the default has been configured to.

@dgieselaar is looking into adding telemetry around settings usage (if it's not already available)

@dgieselaar
Copy link
Member

@dgieselaar is looking into adding telemetry around settings usage (if it's not already available)

It's collected by default, but only for the default space. I'd say that's acceptable for us, thoughts?

@sorenlouv
Copy link
Member Author

It's collected by default, but only for the default space. I'd say that's acceptable for us, thoughts?

Great! Yeah, I'd say that's enough to get us started.

@chrisdistasio
Copy link

Advanced settings are space level. User level would be great but that's a feature request for the kibana platform.

Thanks @sqren. Do we have the ability in APM to persist a user setting as a cookie? So whatever setting I previously set will be the in-place setting next I log in?

@ogupte
Copy link
Contributor

ogupte commented Feb 22, 2022

Do we have the ability in APM to persist a user setting as a cookie? So whatever setting I previously set will be the in-place setting next I log in?

We use local storage in some places in APM to store minor view settings: show/hide advanced stats in correlations, if the user has dismissed the anomaly callout, and migration status for continuity between page refreshes. Also in service groups we use it to store group orientation (grid vs list). It's possble to persist selected environment here as well, however the list of selectable environments might change depending on time range, so it could still get into an state were we need to fall back to a default setting.

@dgieselaar
Copy link
Member

A bug was created earlier: #128749, I've opened a PR w/ a fix here: #129457

@dgieselaar dgieselaar added the apm:test-plan-done Pull request that was successfully tested during the test plan label Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:performance APM UI - Performance Work apm:service-inventory apm:test-plan-done Pull request that was successfully tested during the test plan Team:APM All issues that need APM UI Team support v8.2.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants