Skip to content

Commit 5de46d1

Browse files
authored
Use LogsDB for profiling events to reduce storage footprint (elastic#122034)
* Use LogsDB for profiling events to reduce storage footprint (~30% for events only) * Amend number for storage footprint
1 parent f142e48 commit 5de46d1

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

x-pack/plugin/core/template-resources/src/main/resources/profiling/component-template/profiling-events.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"template": {
33
"settings": {
4+
"mode": "logsdb",
45
"index": {
56
"number_of_shards": 4,
67
"auto_expand_replicas": "0-1",
@@ -11,15 +12,22 @@
1112
"profiling.project.id",
1213
"k8s.namespace.name",
1314
"orchestrator.resource.name",
15+
"service.name",
1416
"host.name",
1517
"container.name",
16-
"process.thread.name"
18+
"process.thread.name",
19+
"@timestamp"
20+
],
21+
"order": [
22+
"asc",
23+
"asc",
24+
"asc",
25+
"asc",
26+
"asc",
27+
"asc",
28+
"asc",
29+
"desc"
1730
]
18-
},
19-
"mapping": {
20-
"source": {
21-
"mode": "synthetic"
22-
}
2331
}
2432
},
2533
"codec": "best_compression"

x-pack/plugin/profiling/src/main/java/org/elasticsearch/xpack/profiling/persistence/ProfilingIndexTemplateRegistry.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ public class ProfilingIndexTemplateRegistry extends IndexTemplateRegistry {
5454
// version 11: Added 'profiling.agent.protocol' keyword mapping to profiling-hosts
5555
// version 12: Added 'profiling.agent.env_https_proxy' keyword mapping to profiling-hosts
5656
// version 13: Added 'container.id' keyword mapping to profiling-events
57-
public static final int INDEX_TEMPLATE_VERSION = 14;
57+
// version 14: Stop using using _source.mode attribute in index templates
58+
// version 15: Use LogsDB mode for profiling-events-* (~30% smaller storage footprint)
59+
public static final int INDEX_TEMPLATE_VERSION = 15;
5860

5961
// history for individual indices / index templates. Only bump these for breaking changes that require to create a new index
60-
public static final int PROFILING_EVENTS_VERSION = 5;
62+
public static final int PROFILING_EVENTS_VERSION = 6;
6163
public static final int PROFILING_EXECUTABLES_VERSION = 1;
6264
public static final int PROFILING_METRICS_VERSION = 2;
6365
public static final int PROFILING_HOSTS_VERSION = 2;

0 commit comments

Comments
 (0)