Skip to content

Commit 3272fba

Browse files
authored
Merge branch 'main' into fix/luceneWildcardToRegExp
2 parents 7325e44 + 9d24fcc commit 3272fba

File tree

82 files changed

+2259
-554
lines changed

Some content is hidden

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

82 files changed

+2259
-554
lines changed

.buildkite/pipelines/intake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ steps:
5656
timeout_in_minutes: 300
5757
matrix:
5858
setup:
59-
BWC_VERSION: ["8.17.7", "8.18.3", "8.19.0", "9.0.3", "9.1.0"]
59+
BWC_VERSION: ["8.17.8", "8.18.3", "8.19.0", "9.0.3", "9.1.0"]
6060
agents:
6161
provider: gcp
6262
image: family/elasticsearch-ubuntu-2004

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ steps:
303303
env:
304304
BWC_VERSION: 8.16.6
305305

306-
- label: "{{matrix.image}} / 8.17.7 / packaging-tests-upgrade"
307-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.7
306+
- label: "{{matrix.image}} / 8.17.8 / packaging-tests-upgrade"
307+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.8
308308
timeout_in_minutes: 300
309309
matrix:
310310
setup:
@@ -317,7 +317,7 @@ steps:
317317
machineType: custom-16-32768
318318
buildDirectory: /dev/shm/bk
319319
env:
320-
BWC_VERSION: 8.17.7
320+
BWC_VERSION: 8.17.8
321321

322322
- label: "{{matrix.image}} / 8.18.3 / packaging-tests-upgrade"
323323
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.3

.buildkite/pipelines/periodic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ steps:
325325
- signal_reason: agent_stop
326326
limit: 3
327327

328-
- label: 8.17.7 / bwc
329-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.7#bwcTest
328+
- label: 8.17.8 / bwc
329+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.8#bwcTest
330330
timeout_in_minutes: 300
331331
agents:
332332
provider: gcp
@@ -335,7 +335,7 @@ steps:
335335
buildDirectory: /dev/shm/bk
336336
preemptible: true
337337
env:
338-
BWC_VERSION: 8.17.7
338+
BWC_VERSION: 8.17.8
339339
retry:
340340
automatic:
341341
- exit_status: "-1"
@@ -486,7 +486,7 @@ steps:
486486
setup:
487487
ES_RUNTIME_JAVA:
488488
- openjdk21
489-
BWC_VERSION: ["8.17.7", "8.18.3", "8.19.0", "9.0.3", "9.1.0"]
489+
BWC_VERSION: ["8.17.8", "8.18.3", "8.19.0", "9.0.3", "9.1.0"]
490490
agents:
491491
provider: gcp
492492
image: family/elasticsearch-ubuntu-2004
@@ -529,7 +529,7 @@ steps:
529529
ES_RUNTIME_JAVA:
530530
- openjdk21
531531
- openjdk23
532-
BWC_VERSION: ["8.17.7", "8.18.3", "8.19.0", "9.0.3", "9.1.0"]
532+
BWC_VERSION: ["8.17.8", "8.18.3", "8.19.0", "9.0.3", "9.1.0"]
533533
agents:
534534
provider: gcp
535535
image: family/elasticsearch-ubuntu-2004

.ci/bwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ BWC_VERSION:
1616
- "8.14.3"
1717
- "8.15.5"
1818
- "8.16.6"
19-
- "8.17.7"
19+
- "8.17.8"
2020
- "8.18.3"
2121
- "8.19.0"
2222
- "9.0.3"

.ci/snapshotBwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BWC_VERSION:
2-
- "8.17.7"
2+
- "8.17.8"
33
- "8.18.3"
44
- "8.19.0"
55
- "9.0.3"

docs/changelog/125699.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 125699
2+
summary: Adding `NormalizeForStreamProcessor`
3+
area: Ingest Node
4+
type: feature
5+
issues: []

docs/reference/elasticsearch/index-settings/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ Settings are available for the following modules:
3434
Configure the backing indices in a time series data stream (TSDS).
3535
* [Translog](translog.md)
3636
Control the transaction log and background flush operations.
37+
38+
There are also index settings associated with [text analysis](docs-content://manage-data/data-store/text-analysis.md), which define analyzers, tokenizers, token filters, and character filters.

docs/reference/enrich-processor/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ Refer to [Enrich your data](docs-content://manage-data/ingest/transform-enrich/d
8484
[`network_direction` processor](/reference/enrich-processor/network-direction-processor.md)
8585
: Calculates the network direction given a source IP address, destination IP address, and a list of internal networks.
8686

87+
[`normalize_for_stream` processor](/reference/enrich-processor/normalize-for-stream.md)
88+
: Normalizes non-OpenTelemetry documents to be OpenTelemetry-compliant.
89+
8790
[`registered_domain` processor](/reference/enrich-processor/registered-domain-processor.md)
8891
: Extracts the registered domain (also known as the effective top-level domain or eTLD), sub-domain, and top-level domain from a fully qualified domain name (FQDN).
8992

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
---
2+
navigation_title: "Normalize for Stream"
3+
mapped_pages:
4+
- https://www.elastic.co/guide/en/elasticsearch/reference/current/normalize-for-stream-processor.html
5+
---
6+
7+
# Normalize-for-Stream processor [normalize-for-stream-processor]
8+
9+
10+
Detects whether a document is OpenTelemetry-compliant and if not -
11+
normalizes it as described below. If used in combination with the OTel-related
12+
mappings such as the ones defined in `logs-otel@template`, the resulting
13+
document can be queried seamlessly by clients that expect either [ECS](https://www.elastic.co/guide/en/ecs/current/index.html) or OpenTelemetry-[Semantic-Conventions](https://github.com/open-telemetry/semantic-conventions) formats.
14+
15+
::::{note}
16+
This processor is in tech preview and is not available in our serverless offering.
17+
::::
18+
19+
## Detecting OpenTelemetry compliance
20+
21+
The processor detects OpenTelemetry compliance by checking the following fields:
22+
* `resource` exists as a key and the value is a map
23+
* `resource` either doesn't contain an `attributes` field, or contains an `attributes` field of type map
24+
* `scope` is either missing or a map
25+
* `attributes` is either missing or a map
26+
* `body` is either missing or a map
27+
* `body` either doesn't contain a `text` field, or contains a `text` field of type `String`
28+
* `body` either doesn't contain a `structured` field, or contains a `structured` field that is not of type `String`
29+
30+
If all of these conditions are met, the document is considered OpenTelemetry-compliant and is not modified by the processor.
31+
32+
## Normalization
33+
34+
If the document is not OpenTelemetry-compliant, the processor normalizes it as follows:
35+
* Specific ECS fields are renamed to have their corresponding OpenTelemetry Semantic Conventions attribute names. These include the following:
36+
37+
| ECS Field | Semantic Conventions Attribute |
38+
|-------------|--------------------------------|
39+
| `span.id` | `span_id` |
40+
| `trace.id` | `trace_id` |
41+
| `message` | `body.text` |
42+
| `log.level` | `severity_text` |
43+
The processor first looks for the nested form of the ECS field and if such does not exist, it looks for a top-level field with the dotted field name.
44+
* Other specific ECS fields that describe resources and have corresponding counterparts in the OpenTelemetry Semantic Conventions are moved to the `resource.attribtues` map. Fields that are considered resource attributes are such that conform to the following conditions:
45+
* They are ECS fields that have corresponding counterparts (either with
46+
the same name or with a different name) in OpenTelemetry Semantic Conventions.
47+
* The corresponding OpenTelemetry attribute is defined in
48+
[Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/tree/main/model)
49+
within a group that is defined as `type: enitity`.
50+
* All other fields, except for `@timestamp`, are moved to the `attributes` map.
51+
* All non-array entries of the `attributes` and `resource.attributes` maps are flattened. Flattening means that nested objects are merged into their parent object, and the keys are concatenated with a dot. See examples below.
52+
53+
## Examples
54+
55+
If an OpenTelemetry-compliant document is detected, the processor does nothing. For example, the following document will stay unchanged:
56+
57+
```json
58+
{
59+
"resource": {
60+
"attributes": {
61+
"service.name": "my-service"
62+
}
63+
},
64+
"scope": {
65+
"name": "my-library",
66+
"version": "1.0.0"
67+
},
68+
"attributes": {
69+
"http.method": "GET"
70+
},
71+
"body": {
72+
"text": "Hello, world!"
73+
}
74+
}
75+
```
76+
77+
If a non-OpenTelemetry-compliant document is detected, the processor normalizes it. For example, the following document:
78+
79+
```json
80+
{
81+
"@timestamp": "2023-10-01T12:00:00Z",
82+
"service": {
83+
"name": "my-service",
84+
"version": "1.0.0",
85+
"environment": "production",
86+
"language": {
87+
"name": "python",
88+
"version": "3.8"
89+
}
90+
},
91+
"log": {
92+
"level": "INFO"
93+
},
94+
"message": "Hello, world!",
95+
"http": {
96+
"method": "GET",
97+
"url": {
98+
"path": "/api/v1/resource"
99+
},
100+
"headers": [
101+
{
102+
"name": "Authorization",
103+
"value": "Bearer token"
104+
},
105+
{
106+
"name": "User-Agent",
107+
"value": "my-client/1.0"
108+
}
109+
]
110+
},
111+
"span" : {
112+
"id": "1234567890abcdef"
113+
},
114+
"span.id": "abcdef1234567890",
115+
"trace.id": "abcdef1234567890abcdef1234567890"
116+
}
117+
```
118+
will be normalized into the following form:
119+
120+
```json
121+
{
122+
"@timestamp": "2023-10-01T12:00:00Z",
123+
"resource": {
124+
"attributes": {
125+
"service.name": "my-service",
126+
"service.version": "1.0.0",
127+
"service.environment": "production"
128+
}
129+
},
130+
"attributes": {
131+
"service.language.name": "python",
132+
"service.language.version": "3.8",
133+
"http.method": "GET",
134+
"http.url.path": "/api/v1/resource",
135+
"http.headers": [
136+
{
137+
"name": "Authorization",
138+
"value": "Bearer token"
139+
},
140+
{
141+
"name": "User-Agent",
142+
"value": "my-client/1.0"
143+
}
144+
]
145+
},
146+
"body": {
147+
"text": "Hello, world!"
148+
},
149+
"span_id": "1234567890abcdef",
150+
"trace_id": "abcdef1234567890abcdef1234567890"
151+
}
152+
```

docs/reference/enrich-processor/toc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ toc:
2828
- file: kv-processor.md
2929
- file: lowercase-processor.md
3030
- file: network-direction-processor.md
31+
- file: normalize-for-stream.md
3132
- file: pipeline-processor.md
3233
- file: redact-processor.md
3334
- file: registered-domain-processor.md
@@ -44,4 +45,4 @@ toc:
4445
- file: uppercase-processor.md
4546
- file: urldecode-processor.md
4647
- file: uri-parts-processor.md
47-
- file: user-agent-processor.md
48+
- file: user-agent-processor.md

0 commit comments

Comments
 (0)