Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ingest: translate known OpenTelemetry JVM metrics #4986

Merged
merged 12 commits into from
Apr 1, 2021
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"
simitt marked this conversation as resolved.
Show resolved Hide resolved
}
},
{
"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": "jvm.gc.time",
"copy_from": "runtime.jvm.gc.collection",
"if": "ctx.runtime?.jvm?.gc?.collection != null"
}
},
{
"set": {
"field": "labels.name",
"copy_from": "labels.gc",
"override": false,
"if": "ctx.labels?.gc != null"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"name": "metrics-apm.app-0.1.0-apm_error_grouping_name",
"if": "ctx.processor?.event == 'error'"
}
},
{
"pipeline": {
"name": "metrics-apm.app-0.1.0-apm_opentelemetry_metrics",
"if": "ctx.processor?.event == 'metric'"
}
}
]
}
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.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": "jvm.gc.time",
"copy_from": "runtime.jvm.gc.collection",
"if": "ctx.runtime?.jvm?.gc?.collection != null"
}
},
{
"set": {
"field": "labels.name",
"copy_from": "labels.gc",
"override": false,
"if": "ctx.labels?.gc != null"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"name": "logs-apm.error-0.1.0-apm_error_grouping_name",
"if": "ctx.processor?.event == 'error'"
}
},
{
"pipeline": {
"name": "logs-apm.error-0.1.0-apm_opentelemetry_metrics",
"if": "ctx.processor?.event == 'metric'"
}
}
]
}
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.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": "jvm.gc.time",
"copy_from": "runtime.jvm.gc.collection",
"if": "ctx.runtime?.jvm?.gc?.collection != null"
}
},
{
"set": {
"field": "labels.name",
"copy_from": "labels.gc",
"override": false,
"if": "ctx.labels?.gc != null"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"name": "metrics-apm.internal-0.1.0-apm_error_grouping_name",
"if": "ctx.processor?.event == 'error'"
}
},
{
"pipeline": {
"name": "metrics-apm.internal-0.1.0-apm_opentelemetry_metrics",
"if": "ctx.processor?.event == 'metric'"
}
}
]
}
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.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": "jvm.gc.time",
"copy_from": "runtime.jvm.gc.collection",
"if": "ctx.runtime?.jvm?.gc?.collection != null"
}
},
{
"set": {
"field": "labels.name",
"copy_from": "labels.gc",
"override": false,
"if": "ctx.labels?.gc != null"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"name": "metrics-apm.profiling-0.1.0-apm_error_grouping_name",
"if": "ctx.processor?.event == 'error'"
}
},
{
"pipeline": {
"name": "metrics-apm.profiling-0.1.0-apm_opentelemetry_metrics",
"if": "ctx.processor?.event == 'metric'"
}
}
]
}
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.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": "jvm.gc.time",
"copy_from": "runtime.jvm.gc.collection",
"if": "ctx.runtime?.jvm?.gc?.collection != null"
}
},
{
"set": {
"field": "labels.name",
"copy_from": "labels.gc",
"override": false,
"if": "ctx.labels?.gc != null"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"name": "traces-apm-0.1.0-apm_error_grouping_name",
"if": "ctx.processor?.event == 'error'"
}
},
{
"pipeline": {
"name": "traces-apm-0.1.0-apm_opentelemetry_metrics",
"if": "ctx.processor?.event == 'metric'"
}
}
]
}
1 change: 1 addition & 0 deletions changelogs/head.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ https:/elastic/apm-server/compare/7.12\...master[View commits]
* Improved coverage of translation of OpenTelemetry resource conventions {pull}4955[4955]
* Set `client.ip` for events from the Elastic APM iOS agent {pull}4975[4975]
* Calculate service destination metrics for OpenTelemetry spans {pull}4976[4976]
* Ingest pipeline for translating OpenTelemetry Java metrics to Elastic APM fields {pull}4986[4986]

[float]
==== Deprecated
50 changes: 50 additions & 0 deletions ingest/pipeline/definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
"name": "apm_error_grouping_name",
"if": "ctx.processor?.event == 'error'"
}
},
{
"pipeline": {
"name": "apm_opentelemetry_metrics",
"if": "ctx.processor?.event == 'metric'"
}
}
]
}
Expand Down Expand Up @@ -137,5 +143,49 @@
}
]
}
},
{
"id": "apm_opentelemetry_metrics",
"body": {
"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.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": "jvm.gc.time",
"copy_from": "runtime.jvm.gc.collection",
"if": "ctx.runtime?.jvm?.gc?.collection != null"
}
},
{
"set": {
"field": "labels.name",
"copy_from": "labels.gc",
"override": false,
"if": "ctx.labels?.gc != null"
}
}
]
}
}
]
Loading