-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ingest: translate known OpenTelemetry JVM metrics (#4986)
* ingest: translate known OpenTelemetry JVM metrics Copy well-known JVM metrics from their OpenTelemetry names and associated labels to their counterparts produced by the Elastic APM Java agent. This enables users to visualise the metrics in the Elastic APM app in Kibana. Metrics are duplicated to avoid surprising users by silently dropping the OpenTelemetry names. Users can drop either one of the duplicates with ingest pipeline customisation. * Add changelog * docs: document new ingest pipelines * docs: move existing docs to correct position * ingest: address review comments - Move `runtime.jvm.gc.collection` before `runtime.jvm.gc.time` - Require `ctx.runtime?.jvm?.gc != null` when copying `labels.gc` * Regenerate integration package
- Loading branch information
Showing
15 changed files
with
407 additions
and
16 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
....2.0/data_stream/app_metrics/elasticsearch/ingest_pipeline/apm_opentelemetry_metrics.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,41 @@ | ||
{ | ||
"description": "Populate Elastic APM metric fields from well-known OpenTelemetry metric counterparts", | ||
"processors": [ | ||
{ | ||
"set": { | ||
"field": "jvm.memory.{{labels.area}}.{{labels.type}}", | ||
"copy_from": "runtime.jvm.memory.area", | ||
"if": "ctx.runtime?.jvm?.memory?.area != null && ctx.labels?.area != null && ctx.labels?.type != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.time", | ||
"copy_from": "runtime.jvm.gc.collection", | ||
"if": "ctx.runtime?.jvm?.gc?.collection != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.time", | ||
"copy_from": "runtime.jvm.gc.time", | ||
"if": "ctx.runtime?.jvm?.gc?.time != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.count", | ||
"copy_from": "runtime.jvm.gc.count", | ||
"if": "ctx.runtime?.jvm?.gc?.count != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "labels.name", | ||
"copy_from": "labels.gc", | ||
"override": false, | ||
"if": "ctx.labels?.gc != null && ctx.runtime?.jvm?.gc != null" | ||
} | ||
} | ||
] | ||
} |
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
41 changes: 41 additions & 0 deletions
41
...0.2.0/data_stream/error_logs/elasticsearch/ingest_pipeline/apm_opentelemetry_metrics.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,41 @@ | ||
{ | ||
"description": "Populate Elastic APM metric fields from well-known OpenTelemetry metric counterparts", | ||
"processors": [ | ||
{ | ||
"set": { | ||
"field": "jvm.memory.{{labels.area}}.{{labels.type}}", | ||
"copy_from": "runtime.jvm.memory.area", | ||
"if": "ctx.runtime?.jvm?.memory?.area != null && ctx.labels?.area != null && ctx.labels?.type != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.time", | ||
"copy_from": "runtime.jvm.gc.collection", | ||
"if": "ctx.runtime?.jvm?.gc?.collection != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.time", | ||
"copy_from": "runtime.jvm.gc.time", | ||
"if": "ctx.runtime?.jvm?.gc?.time != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.count", | ||
"copy_from": "runtime.jvm.gc.count", | ||
"if": "ctx.runtime?.jvm?.gc?.count != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "labels.name", | ||
"copy_from": "labels.gc", | ||
"override": false, | ||
"if": "ctx.labels?.gc != null && ctx.runtime?.jvm?.gc != null" | ||
} | ||
} | ||
] | ||
} |
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
41 changes: 41 additions & 0 deletions
41
...data_stream/internal_metrics/elasticsearch/ingest_pipeline/apm_opentelemetry_metrics.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,41 @@ | ||
{ | ||
"description": "Populate Elastic APM metric fields from well-known OpenTelemetry metric counterparts", | ||
"processors": [ | ||
{ | ||
"set": { | ||
"field": "jvm.memory.{{labels.area}}.{{labels.type}}", | ||
"copy_from": "runtime.jvm.memory.area", | ||
"if": "ctx.runtime?.jvm?.memory?.area != null && ctx.labels?.area != null && ctx.labels?.type != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.time", | ||
"copy_from": "runtime.jvm.gc.collection", | ||
"if": "ctx.runtime?.jvm?.gc?.collection != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.time", | ||
"copy_from": "runtime.jvm.gc.time", | ||
"if": "ctx.runtime?.jvm?.gc?.time != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.count", | ||
"copy_from": "runtime.jvm.gc.count", | ||
"if": "ctx.runtime?.jvm?.gc?.count != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "labels.name", | ||
"copy_from": "labels.gc", | ||
"override": false, | ||
"if": "ctx.labels?.gc != null && ctx.runtime?.jvm?.gc != null" | ||
} | ||
} | ||
] | ||
} |
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
41 changes: 41 additions & 0 deletions
41
.../data_stream/profile_metrics/elasticsearch/ingest_pipeline/apm_opentelemetry_metrics.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,41 @@ | ||
{ | ||
"description": "Populate Elastic APM metric fields from well-known OpenTelemetry metric counterparts", | ||
"processors": [ | ||
{ | ||
"set": { | ||
"field": "jvm.memory.{{labels.area}}.{{labels.type}}", | ||
"copy_from": "runtime.jvm.memory.area", | ||
"if": "ctx.runtime?.jvm?.memory?.area != null && ctx.labels?.area != null && ctx.labels?.type != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.time", | ||
"copy_from": "runtime.jvm.gc.collection", | ||
"if": "ctx.runtime?.jvm?.gc?.collection != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.time", | ||
"copy_from": "runtime.jvm.gc.time", | ||
"if": "ctx.runtime?.jvm?.gc?.time != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.count", | ||
"copy_from": "runtime.jvm.gc.count", | ||
"if": "ctx.runtime?.jvm?.gc?.count != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "labels.name", | ||
"copy_from": "labels.gc", | ||
"override": false, | ||
"if": "ctx.labels?.gc != null && ctx.runtime?.jvm?.gc != null" | ||
} | ||
} | ||
] | ||
} |
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
41 changes: 41 additions & 0 deletions
41
...apm/0.2.0/data_stream/traces/elasticsearch/ingest_pipeline/apm_opentelemetry_metrics.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,41 @@ | ||
{ | ||
"description": "Populate Elastic APM metric fields from well-known OpenTelemetry metric counterparts", | ||
"processors": [ | ||
{ | ||
"set": { | ||
"field": "jvm.memory.{{labels.area}}.{{labels.type}}", | ||
"copy_from": "runtime.jvm.memory.area", | ||
"if": "ctx.runtime?.jvm?.memory?.area != null && ctx.labels?.area != null && ctx.labels?.type != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.time", | ||
"copy_from": "runtime.jvm.gc.collection", | ||
"if": "ctx.runtime?.jvm?.gc?.collection != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.time", | ||
"copy_from": "runtime.jvm.gc.time", | ||
"if": "ctx.runtime?.jvm?.gc?.time != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "jvm.gc.count", | ||
"copy_from": "runtime.jvm.gc.count", | ||
"if": "ctx.runtime?.jvm?.gc?.count != null" | ||
} | ||
}, | ||
{ | ||
"set": { | ||
"field": "labels.name", | ||
"copy_from": "labels.gc", | ||
"override": false, | ||
"if": "ctx.labels?.gc != null && ctx.runtime?.jvm?.gc != null" | ||
} | ||
} | ||
] | ||
} |
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
Oops, something went wrong.