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

[Infra] apm_data_access service to return host names #189894

Merged

Conversation

crespocarlos
Copy link
Contributor

@crespocarlos crespocarlos commented Aug 5, 2024

closes #188752

Summary

This PR creates a service that will return host names collected by APM.

NOTE: At first, we'll use this service to join the host names from APM with metrics collected by the system module to build the hosts with metrics lists - not necessarily to be used in the total hosts count functionality. This service may be adjusted as we start using it in Infra.

@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@crespocarlos
Copy link
Contributor Author

/ci

@crespocarlos crespocarlos changed the title [Infra] Get hostnames from apm [Infra] host names from APM docs Aug 5, 2024
@crespocarlos crespocarlos changed the title [Infra] host names from APM docs [Infra] apm_data_access service to return host names Aug 5, 2024
@crespocarlos crespocarlos added Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.16.0 release_note:skip Skip the PR/issue when compiling release notes labels Aug 6, 2024
@crespocarlos crespocarlos self-assigned this Aug 6, 2024
return async ({ start, end, size = MAX_SIZE, query, documentSources }: HostNamesRequest) => {
const sourcesToUse = getPreferredBucketSizeAndDataSource({
sources: documentSources.filter((s) => suitableTypes.includes(s.documentType)),
bucketSizeInSeconds: getBucketSize({ start, end, numBuckets: 50 }).bucketSize,
Copy link
Member

Choose a reason for hiding this comment

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

should this be (end - start) * 1000?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense. thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to revert this change, with (end - start) * 1000, getPreferredBucketSizeAndDataSource was returning the wrong rollupInterval (10m instead of 1m) with 15m range

@crespocarlos crespocarlos marked this pull request as ready for review August 6, 2024 07:23
@crespocarlos crespocarlos requested review from a team as code owners August 6, 2024 07:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Aug 6, 2024
@crespocarlos
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

kibana-ci commented Aug 6, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: 0a85695
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-189894-0a8569562ae6

Metrics [docs]

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
apmDataAccess 0 1 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @crespocarlos

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM

@crespocarlos crespocarlos merged commit b265604 into elastic:main Aug 7, 2024
23 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Aug 7, 2024
@crespocarlos crespocarlos deleted the 188752-get-hostnames-from-apm branch August 7, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Infra][APM] Create a service in apm_data_access to provide APM collected host names
7 participants