-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ingest: introduce apm_data_stream_migration (#5768)
(cherry picked from commit 4f4dca2) # Conflicts: # changelogs/head.asciidoc
- Loading branch information
Showing
10 changed files
with
346 additions
and
1 deletion.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
.../apm/data_stream/app_metrics/elasticsearch/ingest_pipeline/apm_data_stream_migration.json
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,30 @@ | ||
{ | ||
"description": "Migrate APM events to data streams", | ||
"processors": [ | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'span' || ctx.processor?.event == 'transaction'", | ||
"source": "ctx.data_stream = [\"type\": \"traces\", \"dataset\": \"apm\", \"namespace\": \"migrated\"]\n" | ||
} | ||
}, | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'error'", | ||
"source": "ctx.data_stream = [\"type\": \"logs\", \"dataset\": \"apm.error\", \"namespace\": \"migrated\"]\n" | ||
} | ||
}, | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'metric'", | ||
"source": "String dataset;\nif (ctx[\"metricset.name\"] != \"app\") {\n dataset = \"apm.internal\";\n} else {\n String serviceName = ctx.service.name;\n serviceName = serviceName.toLowerCase();\n serviceName = /[\\\\\\/*?\"<>| ,#:-]/.matcher(serviceName).replaceAll('_');\n dataset = \"apm.app.\" + serviceName;\n}\nctx.data_stream = [\"type\": \"metrics\", \"dataset\": dataset, \"namespace\": \"migrated\"];\n" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"if": "ctx.data_stream != null", | ||
"field": "_index", | ||
"value": "{{data_stream.type}}-{{data_stream.dataset}}-{{data_stream.namespace}}" | ||
} | ||
} | ||
] | ||
} |
30 changes: 30 additions & 0 deletions
30
...e/apm/data_stream/error_logs/elasticsearch/ingest_pipeline/apm_data_stream_migration.json
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,30 @@ | ||
{ | ||
"description": "Migrate APM events to data streams", | ||
"processors": [ | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'span' || ctx.processor?.event == 'transaction'", | ||
"source": "ctx.data_stream = [\"type\": \"traces\", \"dataset\": \"apm\", \"namespace\": \"migrated\"]\n" | ||
} | ||
}, | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'error'", | ||
"source": "ctx.data_stream = [\"type\": \"logs\", \"dataset\": \"apm.error\", \"namespace\": \"migrated\"]\n" | ||
} | ||
}, | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'metric'", | ||
"source": "String dataset;\nif (ctx[\"metricset.name\"] != \"app\") {\n dataset = \"apm.internal\";\n} else {\n String serviceName = ctx.service.name;\n serviceName = serviceName.toLowerCase();\n serviceName = /[\\\\\\/*?\"<>| ,#:-]/.matcher(serviceName).replaceAll('_');\n dataset = \"apm.app.\" + serviceName;\n}\nctx.data_stream = [\"type\": \"metrics\", \"dataset\": dataset, \"namespace\": \"migrated\"];\n" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"if": "ctx.data_stream != null", | ||
"field": "_index", | ||
"value": "{{data_stream.type}}-{{data_stream.dataset}}-{{data_stream.namespace}}" | ||
} | ||
} | ||
] | ||
} |
30 changes: 30 additions & 0 deletions
30
...data_stream/internal_metrics/elasticsearch/ingest_pipeline/apm_data_stream_migration.json
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,30 @@ | ||
{ | ||
"description": "Migrate APM events to data streams", | ||
"processors": [ | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'span' || ctx.processor?.event == 'transaction'", | ||
"source": "ctx.data_stream = [\"type\": \"traces\", \"dataset\": \"apm\", \"namespace\": \"migrated\"]\n" | ||
} | ||
}, | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'error'", | ||
"source": "ctx.data_stream = [\"type\": \"logs\", \"dataset\": \"apm.error\", \"namespace\": \"migrated\"]\n" | ||
} | ||
}, | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'metric'", | ||
"source": "String dataset;\nif (ctx[\"metricset.name\"] != \"app\") {\n dataset = \"apm.internal\";\n} else {\n String serviceName = ctx.service.name;\n serviceName = serviceName.toLowerCase();\n serviceName = /[\\\\\\/*?\"<>| ,#:-]/.matcher(serviceName).replaceAll('_');\n dataset = \"apm.app.\" + serviceName;\n}\nctx.data_stream = [\"type\": \"metrics\", \"dataset\": dataset, \"namespace\": \"migrated\"];\n" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"if": "ctx.data_stream != null", | ||
"field": "_index", | ||
"value": "{{data_stream.type}}-{{data_stream.dataset}}-{{data_stream.namespace}}" | ||
} | ||
} | ||
] | ||
} |
30 changes: 30 additions & 0 deletions
30
.../data_stream/profile_metrics/elasticsearch/ingest_pipeline/apm_data_stream_migration.json
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,30 @@ | ||
{ | ||
"description": "Migrate APM events to data streams", | ||
"processors": [ | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'span' || ctx.processor?.event == 'transaction'", | ||
"source": "ctx.data_stream = [\"type\": \"traces\", \"dataset\": \"apm\", \"namespace\": \"migrated\"]\n" | ||
} | ||
}, | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'error'", | ||
"source": "ctx.data_stream = [\"type\": \"logs\", \"dataset\": \"apm.error\", \"namespace\": \"migrated\"]\n" | ||
} | ||
}, | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'metric'", | ||
"source": "String dataset;\nif (ctx[\"metricset.name\"] != \"app\") {\n dataset = \"apm.internal\";\n} else {\n String serviceName = ctx.service.name;\n serviceName = serviceName.toLowerCase();\n serviceName = /[\\\\\\/*?\"<>| ,#:-]/.matcher(serviceName).replaceAll('_');\n dataset = \"apm.app.\" + serviceName;\n}\nctx.data_stream = [\"type\": \"metrics\", \"dataset\": dataset, \"namespace\": \"migrated\"];\n" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"if": "ctx.data_stream != null", | ||
"field": "_index", | ||
"value": "{{data_stream.type}}-{{data_stream.dataset}}-{{data_stream.namespace}}" | ||
} | ||
} | ||
] | ||
} |
30 changes: 30 additions & 0 deletions
30
...ckage/apm/data_stream/traces/elasticsearch/ingest_pipeline/apm_data_stream_migration.json
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,30 @@ | ||
{ | ||
"description": "Migrate APM events to data streams", | ||
"processors": [ | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'span' || ctx.processor?.event == 'transaction'", | ||
"source": "ctx.data_stream = [\"type\": \"traces\", \"dataset\": \"apm\", \"namespace\": \"migrated\"]\n" | ||
} | ||
}, | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'error'", | ||
"source": "ctx.data_stream = [\"type\": \"logs\", \"dataset\": \"apm.error\", \"namespace\": \"migrated\"]\n" | ||
} | ||
}, | ||
{ | ||
"script": { | ||
"if": "ctx.processor?.event == 'metric'", | ||
"source": "String dataset;\nif (ctx[\"metricset.name\"] != \"app\") {\n dataset = \"apm.internal\";\n} else {\n String serviceName = ctx.service.name;\n serviceName = serviceName.toLowerCase();\n serviceName = /[\\\\\\/*?\"<>| ,#:-]/.matcher(serviceName).replaceAll('_');\n dataset = \"apm.app.\" + serviceName;\n}\nctx.data_stream = [\"type\": \"metrics\", \"dataset\": dataset, \"namespace\": \"migrated\"];\n" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"if": "ctx.data_stream != null", | ||
"field": "_index", | ||
"value": "{{data_stream.type}}-{{data_stream.dataset}}-{{data_stream.namespace}}" | ||
} | ||
} | ||
] | ||
} |
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,52 @@ | ||
[[release-notes-head]] | ||
== APM Server version HEAD | ||
|
||
https://github.com/elastic/apm-server/compare/7.13\...master[View commits] | ||
|
||
[float] | ||
==== Breaking Changes | ||
* Removed monitoring counters `apm-server.processor.stream.errors.{queue,server,closed}` {pull}5453[5453] | ||
* APM Server now responds with 403 (HTTP) and PermissionDenied (gRPC) for authenticated but unauthorized requests {pull}5545[5545] | ||
* `sourcemap.error` and `sourcemap.updated` are no longer set due to failing to find a matching source map {pull}5631[5631] | ||
* experimental:["This breaking change applies to the experimental <<apm-integration>>."] Removed `service.name` from dataset {pull}5451[5451] | ||
|
||
[float] | ||
==== Bug fixes | ||
* Fix panic due to misaligned 64-bit access on 32-bit architectures {pull}5277[5277] | ||
* Fixed tail-based sampling pubsub to use _seq_no correctly {pull}5126[5126] | ||
* Removed service name from dataset {pull}5451[5451] | ||
* Fix panic on Fleet policy change when transaction metrics or tail-based sampling are enabled {pull}5670[5670] | ||
* Remove multipart form temporary files left behind by source map uploads {pull}5718[5718] | ||
|
||
[float] | ||
==== Intake API Changes | ||
|
||
[float] | ||
==== Added | ||
* Support setting agent configuration from apm-server.yml {pull}5177[5177] | ||
* Add metric_type and unit to field metadata of system metrics {pull}5230[5230] | ||
* Display apm-server url in fleet ui's apm-server integration {pull}4895[4895] | ||
* Translate otel messaging.* semantic conventions to ECS {pull}5334[5334] | ||
* Add support for dynamic histogram metrics {pull}5239[5239] | ||
* Tail-sampling processor now resumes subscription from previous position after restart {pull}5350[5350] | ||
* Add support for histograms to metrics intake {pull}5360[5360] | ||
* Upgrade Go to 1.16.5 {pull}5454[5454] | ||
* Add units to metric fields {pull}5395[5395] | ||
* Support fetching sourcemaps from fleet {pull}5410[5410] | ||
* Add support for adjusting OTel event timestamps using `telemetry.sdk.elastic_export_timestamp` {pull}5433[5433] | ||
* Add support for OpenTelemetry labels describing mobile connectivity {pull}5436[5436] | ||
* Introduce `apm-server.auth.*` config {pull}5457[5457] | ||
* Add debug logging of OpenTelemetry payloads {pull}5474[5474] | ||
* Add support for more input variables in fleet integration {pull}5444[5444] | ||
* Under fleet, report which agent configs have been applied {pull}5481[5481] | ||
* Server sends its raw config to kibana when running on ECE/ESS {pull}5424[5424] | ||
* Add HTTP span fields as top level ECS fields {pull}5396[5396] | ||
* Introduce `apm-server.auth.anonymous.*` config {pull}5623[5623] | ||
* Upgrade Go to 1.16.6 {pull}5754[5754] | ||
* Introduce ingest pipeline `apm_data_stream_migration` for migrating pre-data stream indices {5768}[5768] | ||
|
||
[float] | ||
==== Deprecated | ||
* Make `destination.service.name` and `destination.service.type` fields optional and deprecated {pull}5468[5468] | ||
* `apm-server.secret_token` is now `apm-server.auth.secret_token` {pull}5457[5457] | ||
* `apm-server.api_key` is now `apm-server.auth.api_key` {pull}5457[5457] |
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