-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into limit-max-assignees…
…-filter
- Loading branch information
Showing
259 changed files
with
11,809 additions
and
3,835 deletions.
There are no files selected for viewing
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
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
2,843 changes: 2,397 additions & 446 deletions
2,843
docs/api-generated/cases/case-apis-passthru.asciidoc
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
55 changes: 55 additions & 0 deletions
55
packages/kbn-apm-synthtrace-client/src/lib/assets/index.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,55 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
// eslint-disable-next-line max-classes-per-file | ||
import { Fields } from '../entity'; | ||
import { Serializable } from '../serializable'; | ||
|
||
// Can I pull in types from asset-manager here? | ||
type AssetKind = 'host' | 'pod' | 'container' | 'service'; | ||
|
||
export interface AssetKindDocument<T extends AssetKind> extends Fields { | ||
'asset.kind': T; | ||
'asset.ean': string; | ||
'asset.id': string; | ||
'asset.name'?: string; | ||
'asset.parents'?: string[]; | ||
'asset.children'?: string[]; | ||
'asset.references'?: string[]; | ||
} | ||
|
||
// What is the best way to tie up relationships? | ||
// With these setters we can go both ways but the entities might be able to produce | ||
// pre-linked assets as well | ||
class Asset<T extends AssetKind> extends Serializable<AssetKindDocument<T>> { | ||
parents(parents: string[]) { | ||
this.fields['asset.parents'] = parents; | ||
} | ||
|
||
children(children: string[]) { | ||
this.fields['asset.children'] = children; | ||
} | ||
|
||
references(references: string[]) { | ||
this.fields['asset.references'] = references; | ||
} | ||
} | ||
|
||
export class HostAsset extends Asset<'host'> {} | ||
|
||
export class PodAsset extends Asset<'pod'> {} | ||
|
||
export class ContainerAsset extends Asset<'container'> {} | ||
|
||
export class ServiceAsset extends Asset<'service'> {} | ||
|
||
export type AssetDocument = | ||
| AssetKindDocument<'host'> | ||
| AssetKindDocument<'pod'> | ||
| AssetKindDocument<'container'> | ||
| AssetKindDocument<'service'>; |
50 changes: 50 additions & 0 deletions
50
packages/kbn-apm-synthtrace-client/src/lib/infra/container.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,50 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
/* eslint-disable max-classes-per-file */ | ||
import { ContainerAsset } from '../assets'; | ||
import { Entity, Fields } from '../entity'; | ||
import { Serializable } from '../serializable'; | ||
|
||
interface ContainerDocument extends Fields { | ||
'container.id': string; | ||
'kubernetes.pod.uid': string; | ||
'kubernetes.node.name': string; | ||
} | ||
|
||
export class Container extends Entity<ContainerDocument> { | ||
metrics() { | ||
return new ContainerMetrics({ | ||
...this.fields, | ||
'kubernetes.container.cpu.usage.limit.pct': 46, | ||
}); | ||
} | ||
|
||
asset() { | ||
return new ContainerAsset({ | ||
'asset.kind': 'container', | ||
'asset.id': this.fields['container.id'], | ||
'asset.name': this.fields['container.id'], | ||
'asset.ean': `container:${this.fields['container.id']}`, | ||
}); | ||
} | ||
} | ||
|
||
export interface ContainerMetricsDocument extends ContainerDocument { | ||
'kubernetes.container.cpu.usage.limit.pct': number; | ||
} | ||
|
||
class ContainerMetrics extends Serializable<ContainerMetricsDocument> {} | ||
|
||
export function container(id: string, uid: string, nodeName: string) { | ||
return new Container({ | ||
'container.id': id, | ||
'kubernetes.pod.uid': uid, | ||
'kubernetes.node.name': nodeName, | ||
}); | ||
} |
Oops, something went wrong.