Skip to content

Commit 686e967

Browse files
committed
Merge branch 'main' into 135150/monitor-detail-flyout
2 parents 16d1a56 + fd1ad82 commit 686e967

File tree

130 files changed

+3826
-949
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+3826
-949
lines changed

.github/relabel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
issues:
22
- missingLabel: needs-team
3-
regex: ^(\:ml)|(Team:.*)$
3+
regex: (^\:ml$)|(^Team:.+$)|(^EUI$)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Add Fleet issue to Platform Ingest project
2+
3+
on:
4+
issues:
5+
types:
6+
- labeled
7+
8+
env:
9+
INGEST_PROJECT_ID: 'PVT_kwDOAGc3Zs4AEzn4'
10+
FLEET_LABEL: 'Team:Fleet'
11+
AREA_FIELD_ID: 'PVTSSF_lADOAGc3Zs4AEzn4zgEgZSo'
12+
FLEET_UI_OPTION_ID: '411a7b86'
13+
14+
jobs:
15+
add_to_ingest_project:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: octokit/graphql-action@v2.x
19+
id: add_to_project
20+
if: ${{ github.event.label.name == env.FLEET_LABEL }}
21+
with:
22+
query: |
23+
# Variables have to be snake cased because of https://github.com/octokit/graphql-action/issues/164
24+
mutation AddToIngestProject($project_id: ID!, $content_id: ID!) {
25+
addProjectV2ItemById(input: { projectId: $project_id, contentId: $content_id }) {
26+
item {
27+
id
28+
}
29+
}
30+
}
31+
project_id: ${{ env.INGEST_PROJECT_ID }}
32+
content_id: ${{ github.event.issue.node_id }}
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.FLEET_TECH_KIBANA_USER_TOKEN }}
35+
- uses: octokit/graphql-action@v2.x
36+
id: set_fleet_ui_area
37+
if: github.event.label.name == env.FLEET_LABEL
38+
with:
39+
query: |
40+
mutation updateIngestArea($item_id: ID!, $project_id: ID!, $area_field_id: ID!, $area_id: String) {
41+
updateProjectV2ItemFieldValue(
42+
input: { itemId: $item_id, projectId: $project_id, fieldId: $area_field_id, value: { singleSelectOptionId: $area_id } }) {
43+
clientMutationId
44+
}
45+
}
46+
item_id: ${{ fromJSON(steps.add_to_project.outputs.data).addProjectV2ItemById.item.id }}
47+
project_id: ${{ env.INGEST_PROJECT_ID }}
48+
area_field_id: ${{ env.AREA_FIELD_ID }}
49+
area_id: ${{ env.FLEET_UI_OPTION_ID }}
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.FLEET_TECH_KIBANA_USER_TOKEN }}

.github/workflows/add-to-fleet-project.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.
68.7 KB
Loading

docs/osquery/osquery.asciidoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ then view the results.
4343
and you'll get suggestions for agents by name, ID, platform, and policy.
4444
. Specify the query or pack to run:
4545
** *Query*: Select a saved query or enter a new one in the text box. After you enter the query, you can expand the **Advanced** section to view or set <<osquery-map-fields,mapped ECS fields>> included in the results from the live query. Mapping ECS fields is optional.
46-
** *Pack*: Select from query packs that have been loaded and activated. After you select a pack, all of the queries in the pack are displayed.
46+
** *Pack*: Select from available query packs. After you select a pack, all of the queries in the pack are displayed.
4747
+
4848
TIP: Refer to <<osquery-prebuilt-packs,prebuilt packs>> to learn about using and managing Elastic prebuilt packs.
4949
+
@@ -173,13 +173,14 @@ For information about the prebuilt packs that are available, refer to <<prebuilt
173173
[[load-prebuilt-packs]]
174174
==== Load and activate prebuilt Elastic packs
175175

176-
. Go to *Packs*, and then click *Load Elastic prebuilt packs*.
177-
+
178-
NOTE: This option is only available if new or updated prebuilt packs are available.
176+
Follow these steps to load and turn on new or updated prebuilt packs:
179177

180-
. For each pack that you want to schedule:
178+
. Go to *Packs*, and then click *Load Elastic prebuilt packs*.
179+
. For each pack that you want to activate and schedule:
181180

182-
* Enable the option to make the pack *Active*.
181+
* Turn on the *Active* toggle to ensure the pack runs continuously.
182+
+
183+
NOTE: You must manually run inactive packs.
183184

184185
* Click the pack name, then *Edit*.
185186

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@
13191319
"callsites": "^3.1.0",
13201320
"chance": "1.0.18",
13211321
"chokidar": "^3.5.3",
1322-
"chromedriver": "^105.0.1",
1322+
"chromedriver": "^107.0.0",
13231323
"clean-webpack-plugin": "^3.0.0",
13241324
"compression-webpack-plugin": "^4.0.0",
13251325
"copy-webpack-plugin": "^6.0.2",
@@ -1328,13 +1328,13 @@
13281328
"cssnano": "^5.1.12",
13291329
"cssnano-preset-default": "^5.2.12",
13301330
"csstype": "^3.0.2",
1331-
"cypress": "^10.9.0",
1331+
"cypress": "^10.10.0",
13321332
"cypress-axe": "^1.0.0",
13331333
"cypress-file-upload": "^5.0.8",
13341334
"cypress-multi-reporters": "^1.6.1",
13351335
"cypress-pipe": "^2.0.0",
13361336
"cypress-react-selector": "^3.0.0",
1337-
"cypress-real-events": "^1.7.1",
1337+
"cypress-real-events": "^1.7.2",
13381338
"cypress-recurse": "^1.23.0",
13391339
"debug": "^2.6.9",
13401340
"delete-empty": "^2.0.0",

packages/kbn-apm-synthtrace/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
export { timerange } from './src/lib/timerange';
1010
export { apm } from './src/lib/apm';
11+
export { dedot } from './src/lib/utils/dedot';
1112
export { stackMonitoring } from './src/lib/stack_monitoring';
1213
export { observer } from './src/lib/agent_config';
1314
export { cleanWriteTargets } from './src/lib/utils/clean_write_targets';

packages/kbn-apm-synthtrace/src/lib/apm/apm_error.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,10 @@ export class ApmError extends Serializable<ApmFields> {
2727
);
2828
return [data];
2929
}
30+
31+
timestamp(value: number) {
32+
const ret = super.timestamp(value);
33+
this.fields['timestamp.us'] = value * 1000;
34+
return ret;
35+
}
3036
}

packages/kbn-apm-synthtrace/src/lib/apm/base_span.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,10 @@ export class BaseSpan extends Serializable<ApmFields> {
8888
});
8989
return this;
9090
}
91+
92+
override timestamp(timestamp: number) {
93+
const ret = super.timestamp(timestamp);
94+
this.fields['timestamp.us'] = timestamp * 1000;
95+
return ret;
96+
}
9197
}

packages/kbn-apm-synthtrace/src/lib/apm/instance.ts

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,49 @@ export type SpanParams = {
2020
} & ApmFields;
2121

2222
export class Instance extends Entity<ApmFields> {
23-
transaction({
24-
transactionName,
25-
transactionType = 'request',
26-
}: {
27-
transactionName: string;
28-
transactionType?: string;
29-
}) {
23+
transaction(
24+
...options:
25+
| [{ transactionName: string; transactionType?: string }]
26+
| [string]
27+
| [string, string]
28+
) {
29+
let transactionName: string;
30+
let transactionType: string | undefined;
31+
if (options.length === 2) {
32+
transactionName = options[0];
33+
transactionType = options[1];
34+
} else if (typeof options[0] === 'string') {
35+
transactionName = options[0];
36+
} else {
37+
transactionName = options[0].transactionName;
38+
transactionType = options[0].transactionType;
39+
}
40+
3041
return new Transaction({
3142
...this.fields,
3243
'transaction.name': transactionName,
33-
'transaction.type': transactionType,
44+
'transaction.type': transactionType || 'request',
3445
});
3546
}
3647

37-
span({ spanName, spanType, spanSubtype, ...apmFields }: SpanParams) {
48+
span(...options: [string, string] | [string, string, string] | [SpanParams]) {
49+
let spanName: string;
50+
let spanType: string;
51+
let spanSubtype: string;
52+
let fields: ApmFields;
53+
54+
if (options.length === 3 || options.length === 2) {
55+
spanName = options[0];
56+
spanType = options[1];
57+
spanSubtype = options[2] || 'unknown';
58+
fields = {};
59+
} else {
60+
({ spanName, spanType, spanSubtype = 'unknown', ...fields } = options[0]);
61+
}
62+
3863
return new Span({
3964
...this.fields,
40-
...apmFields,
65+
...fields,
4166
'span.name': spanName,
4267
'span.type': spanType,
4368
'span.subtype': spanSubtype,

0 commit comments

Comments
 (0)