[APM] Logs only service details view (#187221)
closes https://github.com/elastic/kibana/issues/183013
- Introduce`logs-services` route for the logs only entities with the
tabs
- overview page
- Logs
- Dashboard
- Log error rate and Log rate charts
- Add 2 services in the logs access plugin to fetch the timeseries for
the above charts
6969b373
-6710-44ab-8a2c-3e6c0e365004
### How to test
2. Enable `observability:apmEnableMultiSignal` in advansted settings
<details>
<summary>3. Run the entities definition in the dev tools</summary>
```
POST kbn:/internal/api/entities/definition
{
"id": "apm-services-with-metadata",
"name": "Services from logs and metrics",
"displayNameTemplate": "test",
"history": {
"timestampField": "@timestamp",
"interval": "5m"
},
"type": "service",
"indexPatterns": [
"logs-*",
"metrics-*"
],
"timestampField": "@timestamp",
"lookback": "5m",
"identityFields": [
{
"field": "service.name",
"optional": false
},
{
"field": "service.environment",
"optional": true
}
],
"identityTemplate": "{{service.name}}:{{service.environment}}",
"metadata": [
"tags",
"host.name",
"data_stream.type",
"service.name",
"service.instance.id",
"service.namespace",
"service.environment",
"service.version",
"service.runtime.name",
"service.runtime.version",
"service.node.name",
"service.language.name",
"agent.name",
"cloud.provider",
"cloud.instance.id",
"cloud.availability_zone",
"cloud.instance.name",
"cloud.machine.type",
"container.id"
],
"metrics": [
{
"name": "latency",
"equation": "A",
"metrics": [
{
"name": "A",
"aggregation": "avg",
"field": "transaction.duration.histogram"
}
]
},
{
"name": "throughput",
"equation": "A / 5",
"metrics": [
{
"name": "A",
"aggregation": "doc_count",
"filter": "transaction.duration.histogram:*"
}
]
},
{
"name": "failedTransactionRate",
"equation": "A / B",
"metrics": [
{
"name": "A",
"aggregation": "doc_count",
"filter": "event.outcome: \"failure\""
},
{
"name": "B",
"aggregation": "doc_count",
"filter": "event.outcome: *"
}
]
},
{
"name": "logErrorRate",
"equation": "A / B",
"metrics": [
{
"name": "A",
"aggregation": "doc_count",
"filter": "log.level: \"error\""
},
{
"name": "B",
"aggregation": "doc_count",
"filter": "log.level: *"
}
]
},
{
"name": "logRatePerMinute",
"equation": "A / 5",
"metrics": [
{
"name": "A",
"aggregation": "doc_count",
"filter": "log.level: \"error\""
}
]
}
]
}
```
</details>
4. Generate data with synthrace
1. logs only: `node scripts/synthtrace simple_logs.ts`
2. APM only: `node scripts/synthtrace simple_trace.ts`
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: jennypavlova <jennypavlova94@gmail.com>
Co-authored-by: jennypavlova <dzheni.pavlova@elastic.co>