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

Remove dependency on infra in monitoring plugin #203551

Merged
merged 13 commits into from
Dec 11, 2024

Conversation

flash1293
Copy link
Contributor

@flash1293 flash1293 commented Dec 10, 2024

Blocked by #203492

The monitoring plugin is currently marked as observability plugin because it's relying on the infra plugin.

However, in practice, no functionality is actually used. This PR removes the dependency -it makes monitoring and logstash a platform/private plugin as well (logstash needs to go along with monitoring, but that should be fine because it's only required by monitoring).

Some considerations left as comments in the code.

@@ -26,7 +26,6 @@ export function enableAlertsRoute(server: MonitoringCore, npRoute: RouteDependen
async (context, request, response) => {
try {
const alertingContext = await context.alerting;
const infraContext = await context.infra;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ This is the only place the infra plugin was used on the server side - it filled in the space it in some server info logs about rule creation.

Theoretically it would be possible to add the spaces plugin as dependency to get the same information, but it doesn't seem worth it doing so as this is strictly about info logging. So I just removed the space id from the log line

@@ -126,6 +126,10 @@ function getLogsUiLink(clusterUuid, nodeId, indexUuid, sharePlugin, logsIndices)
const filter = params.join(' and ');
const discoverLocator = sharePlugin.url.locators.get('DISCOVER_APP_LOCATOR');

if (!discoverLocator) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ If for some reason the discover locator is not available, sharePlugin.url.locators.get will return undefined - this is catching this case.


return infra ? (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Rendering the callout was guarded by whether infra is available or not, which doesn't make a lot of sense anymore since we provide a link to discover, not infra here.

So it's now guarded by whether we can successfully generate a discover link or not.

@consulthys
Copy link
Contributor

/oblt-deploy

@flash1293 flash1293 added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) v8.18.0 labels Dec 10, 2024
@flash1293
Copy link
Contributor Author

@consulthys this was missing a prerequisite - I just merged it in, now it hopefully works (we will see what CI says)

@consulthys
Copy link
Contributor

Thanks @flash1293
Do I need to trigger /oblt-deploy again?

@flash1293
Copy link
Contributor Author

@consulthys I think so, but we can also wait for CI to check whether it even builds or whether I missed something somewhere

Copy link
Contributor

@consulthys consulthys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGT Stack Monitoring

No issues encountered while testing:

  • default rules could be created successfully
  • the Discover link appeared below the logs (when available)

@flash1293 flash1293 marked this pull request as ready for review December 11, 2024 10:38
@flash1293 flash1293 requested review from a team as code owners December 11, 2024 10:38
Copy link
Contributor

@consulthys consulthys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lastest fixes LGT Stack Monitoring

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
monitoring 538.3KB 538.3KB +16.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
monitoring 25.8KB 25.7KB -44.0B

History

Copy link
Contributor

@rudolf rudolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

classification makes sense:

  • logstash is owned by platform/ingest
  • monitoring is owned by platform/opex

@flash1293 flash1293 merged commit 59d3ac6 into elastic:main Dec 11, 2024
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12280363985

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 11, 2024
Blocked by elastic#203492

The monitoring plugin is currently marked as observability plugin
because it's relying on the `infra` plugin.

However, in practice, no functionality is actually used. This PR removes
the dependency -it makes monitoring and logstash a `platform/private`
plugin as well (logstash needs to go along with monitoring, but that
should be fine because it's only required by monitoring).

Some considerations left as comments in the code.

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 59d3ac6)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
Blocked by elastic#203492

The monitoring plugin is currently marked as observability plugin
because it's relying on the `infra` plugin.

However, in practice, no functionality is actually used. This PR removes
the dependency -it makes monitoring and logstash a `platform/private`
plugin as well (logstash needs to go along with monitoring, but that
should be fine because it's only required by monitoring).

Some considerations left as comments in the code.

---------

Co-authored-by: kibanamachine <[email protected]>
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Dec 13, 2024
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

4 similar comments
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

stephmilovic pushed a commit that referenced this pull request Dec 19, 2024
)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Remove dependency on infra in monitoring plugin
(#203551)](#203551)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Joe
Reuter","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-11T16:11:06Z","message":"Remove
dependency on infra in monitoring plugin (#203551)\n\nBlocked by
https://github.com/elastic/kibana/pull/203492\r\n\r\nThe monitoring
plugin is currently marked as observability plugin\r\nbecause it's
relying on the `infra` plugin.\r\n\r\nHowever, in practice, no
functionality is actually used. This PR removes\r\nthe dependency -it
makes monitoring and logstash a `platform/private`\r\nplugin as well
(logstash needs to go along with monitoring, but that\r\nshould be fine
because it's only required by monitoring).\r\n\r\nSome considerations
left as comments in the code.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"59d3ac65ec59408f22c31e629ea563292943727e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","v8.18.0"],"title":"Remove
dependency on infra in monitoring
plugin","number":203551,"url":"https://github.com/elastic/kibana/pull/203551","mergeCommit":{"message":"Remove
dependency on infra in monitoring plugin (#203551)\n\nBlocked by
https://github.com/elastic/kibana/pull/203492\r\n\r\nThe monitoring
plugin is currently marked as observability plugin\r\nbecause it's
relying on the `infra` plugin.\r\n\r\nHowever, in practice, no
functionality is actually used. This PR removes\r\nthe dependency -it
makes monitoring and logstash a `platform/private`\r\nplugin as well
(logstash needs to go along with monitoring, but that\r\nshould be fine
because it's only required by monitoring).\r\n\r\nSome considerations
left as comments in the code.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"59d3ac65ec59408f22c31e629ea563292943727e"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203551","number":203551,"mergeCommit":{"message":"Remove
dependency on infra in monitoring plugin (#203551)\n\nBlocked by
https://github.com/elastic/kibana/pull/203492\r\n\r\nThe monitoring
plugin is currently marked as observability plugin\r\nbecause it's
relying on the `infra` plugin.\r\n\r\nHowever, in practice, no
functionality is actually used. This PR removes\r\nthe dependency -it
makes monitoring and logstash a `platform/private`\r\nplugin as well
(logstash needs to go along with monitoring, but that\r\nshould be fine
because it's only required by monitoring).\r\n\r\nSome considerations
left as comments in the code.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"59d3ac65ec59408f22c31e629ea563292943727e"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Joe Reuter <[email protected]>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Dec 19, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
Blocked by elastic#203492

The monitoring plugin is currently marked as observability plugin
because it's relying on the `infra` plugin.

However, in practice, no functionality is actually used. This PR removes
the dependency -it makes monitoring and logstash a `platform/private`
plugin as well (logstash needs to go along with monitoring, but that
should be fine because it's only required by monitoring).

Some considerations left as comments in the code.

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants