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

[Obs UX] Create query and endpoint for accessing services #171661

Closed
neptunian opened this issue Nov 21, 2023 · 1 comment · Fixed by #173875
Closed

[Obs UX] Create query and endpoint for accessing services #171661

neptunian opened this issue Nov 21, 2023 · 1 comment · Fixed by #173875
Assignees
Labels
Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@neptunian
Copy link
Contributor

neptunian commented Nov 21, 2023

We would like to display services running on a host in the Asset detail/flyout views. Create an endpoint within Infra that queries for a list of APM services, given a host.

  • returns a list of service.name and the related agent.name, filtering by host.name or host.hostname
  • depends on the apm_data_access plugin for index patterns to query against
@neptunian neptunian added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Nov 21, 2023
@elasticmachine
Copy link
Contributor

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

@neptunian neptunian assigned neptunian and unassigned neptunian Nov 27, 2023
@neptunian neptunian changed the title [Obs UX] Create endpoint for accessing services [Obs UX] Create query and endpoint for accessing services Nov 27, 2023
@neptunian neptunian self-assigned this Dec 12, 2023
neptunian added a commit that referenced this issue Feb 5, 2024
## Summary
Creation of a new endpoint within Infra to get services from APM indices
that are related to a give host through `host.name`. These services will
be listed in the Host Detail view in another PR. This endpoint queries
apm transaction metrics and apm logs to get services.

Closes #171661

### Test
The easiest way to test this api is to visit it directly using a host
that has some services attached to it using our test cluster

URL: http://localhost:5601/api/infra/services
eg usage:
`http://localhost:5601/api/infra/services?from=now-15m&to=now&filters={"host.name":"gke-edge-oblt-edge-oblt-pool-5fbec7a6-nfy0"}&size=5`

response:

```
{
    "services": [
        {
            "service.name": "productcatalogservice",
            "agent.name": "opentelemetry/go"
        },
        {
            "service.name": "frontend",
            "agent.name": "opentelemetry/nodejs"
        }
    ]
}
```



### Follow up 
- Have APM server collect host.name as part of service_summary metrics
and query that instead. Service summary aggregates transaction, error,
log, and metric events into service-summary metrics. This would simplify
the query.

- `added apm-synthtrace` to `metrics_ui` api tests and created follow up
PR for removing the code i needed to duplicate
#175064

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
fkanout pushed a commit to fkanout/kibana that referenced this issue Feb 7, 2024
## Summary
Creation of a new endpoint within Infra to get services from APM indices
that are related to a give host through `host.name`. These services will
be listed in the Host Detail view in another PR. This endpoint queries
apm transaction metrics and apm logs to get services.

Closes elastic#171661

### Test
The easiest way to test this api is to visit it directly using a host
that has some services attached to it using our test cluster

URL: http://localhost:5601/api/infra/services
eg usage:
`http://localhost:5601/api/infra/services?from=now-15m&to=now&filters={"host.name":"gke-edge-oblt-edge-oblt-pool-5fbec7a6-nfy0"}&size=5`

response:

```
{
    "services": [
        {
            "service.name": "productcatalogservice",
            "agent.name": "opentelemetry/go"
        },
        {
            "service.name": "frontend",
            "agent.name": "opentelemetry/nodejs"
        }
    ]
}
```



### Follow up 
- Have APM server collect host.name as part of service_summary metrics
and query that instead. Service summary aggregates transaction, error,
log, and metric events into service-summary metrics. This would simplify
the query.

- `added apm-synthtrace` to `metrics_ui` api tests and created follow up
PR for removing the code i needed to duplicate
elastic#175064

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this issue Feb 15, 2024
## Summary
Creation of a new endpoint within Infra to get services from APM indices
that are related to a give host through `host.name`. These services will
be listed in the Host Detail view in another PR. This endpoint queries
apm transaction metrics and apm logs to get services.

Closes elastic#171661

### Test
The easiest way to test this api is to visit it directly using a host
that has some services attached to it using our test cluster

URL: http://localhost:5601/api/infra/services
eg usage:
`http://localhost:5601/api/infra/services?from=now-15m&to=now&filters={"host.name":"gke-edge-oblt-edge-oblt-pool-5fbec7a6-nfy0"}&size=5`

response:

```
{
    "services": [
        {
            "service.name": "productcatalogservice",
            "agent.name": "opentelemetry/go"
        },
        {
            "service.name": "frontend",
            "agent.name": "opentelemetry/nodejs"
        }
    ]
}
```



### Follow up 
- Have APM server collect host.name as part of service_summary metrics
and query that instead. Service summary aggregates transaction, error,
log, and metric events into service-summary metrics. This would simplify
the query.

- `added apm-synthtrace` to `metrics_ui` api tests and created follow up
PR for removing the code i needed to duplicate
elastic#175064

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
fkanout pushed a commit to fkanout/kibana that referenced this issue Mar 4, 2024
## Summary
Creation of a new endpoint within Infra to get services from APM indices
that are related to a give host through `host.name`. These services will
be listed in the Host Detail view in another PR. This endpoint queries
apm transaction metrics and apm logs to get services.

Closes elastic#171661

### Test
The easiest way to test this api is to visit it directly using a host
that has some services attached to it using our test cluster

URL: http://localhost:5601/api/infra/services
eg usage:
`http://localhost:5601/api/infra/services?from=now-15m&to=now&filters={"host.name":"gke-edge-oblt-edge-oblt-pool-5fbec7a6-nfy0"}&size=5`

response:

```
{
    "services": [
        {
            "service.name": "productcatalogservice",
            "agent.name": "opentelemetry/go"
        },
        {
            "service.name": "frontend",
            "agent.name": "opentelemetry/nodejs"
        }
    ]
}
```



### Follow up 
- Have APM server collect host.name as part of service_summary metrics
and query that instead. Service summary aggregates transaction, error,
log, and metric events into service-summary metrics. This would simplify
the query.

- `added apm-synthtrace` to `metrics_ui` api tests and created follow up
PR for removing the code i needed to duplicate
elastic#175064

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants