-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[APM] Logs tab seems to show logs from incorrect service(s) (#110484)
- Loading branch information
1 parent
30f1974
commit a165067
Showing
3 changed files
with
43 additions
and
23 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
x-pack/plugins/apm/public/components/app/service_logs/index.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import { getInfrastructureKQLFilter } from './'; | ||
|
||
describe('service logs', () => { | ||
describe('getInfrastructureKQLFilter', () => { | ||
it('filter by container id', () => { | ||
expect( | ||
getInfrastructureKQLFilter({ | ||
serviceInfrastructure: { | ||
containerIds: ['foo', 'bar'], | ||
hostNames: ['baz', `quz`], | ||
}, | ||
}) | ||
).toEqual('container.id: "foo" or container.id: "bar"'); | ||
}); | ||
it('filter by host names', () => { | ||
expect( | ||
getInfrastructureKQLFilter({ | ||
serviceInfrastructure: { | ||
containerIds: [], | ||
hostNames: ['baz', `quz`], | ||
}, | ||
}) | ||
).toEqual('host.name: "baz" or host.name: "quz"'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters