elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.71k stars 8.13k forks source link

[Deprecations] Report on # of external calls to deprecated Saved Objects APIs in Upgrade Assistant #182319

Open TinaHeiligers opened 4 months ago

TinaHeiligers commented 4 months ago

The Saved Objects Global HTTP APIs were deprecated in 8.7. Can we use the Upgrade Assistant to report the number of external requests to these APIs?

elasticmachine commented 4 months ago

Pinging @elastic/kibana-core (Team:Core)

TinaHeiligers commented 4 months ago

@alisonelizabeth How feasible would this be?

elasticmachine commented 4 months ago

Pinging @elastic/kibana-management (Team:Kibana Management)

alisonelizabeth commented 4 months ago

@TinaHeiligers here is documentation on the current core deprecations service. Please have a look and let me know if you think that will help with your use case - https://github.com/elastic/kibana/blob/main/src/core/server/docs/kib_core_deprecations_service.mdx

TinaHeiligers commented 4 months ago

@gerard and I are considering 2 approaches to answer the question of "has this cluster made external calls to the deprecated APIs":

  1. Surface usage telemetry from the upstream telemetry cluster in an aggregated form in the upgrade assistant.
  2. Surface usage data directly from the .kibana index

Ideally, we can go with option 1 to get an aggregated view of the number of times the APIs have been called over 6 months. This requires read access to the upstream cluster.

If not possible, or there are security concerns, we'll have to go with option 2.

pgayvallet commented 4 months ago

Surface usage telemetry from the upstream telemetry cluster in an aggregated form in the upgrade assistant This requires read access to the upstream cluster.

I feel like this will indeed be a security concern, doesn't it?

TinaHeiligers commented 4 months ago

I feel like this will indeed be a security concern, doesn't it?

It's only a security concern if we connect to the cluster directly and expose sensitive info. The alternatives (less accurate but might be ok), are:

The first option's drawback is that we'll only get info for the current session since telemetry was last sent

Not ideal, but certainly "safer" than reading the data from upstream.

TinaHeiligers commented 3 months ago

@Bamieh can you see how much effort it would be to extract usage counters from SO non-kibana requests in our telemetry data and surface that in the Upgrade Assistant?

If it's not too much work, we can go with that implementation to make it visible that a deployment has an integration with the APIs.

Alternative: Static entry in the UA that states SO HTTP APIs are gone in v9. (possibly link to public docs on the breaking changes in the release notes)

TinaHeiligers commented 1 week ago

@alisonelizabeth the issue we have with surfacing core's deprecations is that the deprecation service is in core!. Right now, we don't have a plugin to use the "standard" implementation. We have to register them from within core's package-land.

alisonelizabeth commented 5 days ago

@alisonelizabeth the issue we have with surfacing core's deprecations is that the deprecation service is in core!. Right now, we don't have a plugin to use the https://github.com/elastic/kibana/issues/182319#issuecomment-2107873684. We have to register them from within core's package-land.

Ah, I see. Are you looking for further assistance from the Management team on this, or are you going to explore other options?

TinaHeiligers commented 5 days ago

Are you looking for further assistance from the Management team on this, or are you going to explore other options?

I'm looking for any advice on the best option to get this done with the least overhead. Has the management team had to handle cases like this before? In your opinion, what would be the best?