{
"_index": ".ds-traces-apm-default-2022.05.06-000004",
"_id": "69pamoAB8N83zBpIV3iY",
"_version": 1,
"_score": 1,
"_source": {
"agent": {
"name": "java",
"ephemeral_id": "db91d7d9-d337-4dbe-b70d-c83f252b20d0",
"version": "1.30.2-SNAPSHOT.null"
},
"process": {
"pid": 1669813,
"title": "/home/sylvain/.sdkman/candidates/java/11.0.8.hs-adpt/bin/java",
"ppid": 1669727
},
"data_stream.namespace": "default",
"processor": {
"name": "transaction",
"event": "transaction"
},
"data_stream.type": "traces",
"observer": {
"hostname": "Sylvain-x390",
"id": "628c5520-eb81-4182-8474-86d00bbbea4a",
"type": "apm-server",
"ephemeral_id": "9858849a-2f9c-4458-a12b-6e3959450095",
"version": "8.2.0"
},
"trace": {
"id": "40e28a7812f558120af9a7372a2d9092"
},
"@timestamp": "2022-05-06T17:10:42.458Z",
"ecs": {
"version": "1.12.0"
},
"service": {
"node": {
"name": "Sylvain-x390"
},
"environment": "local-dev",
"framework": {
"name": "OpenTelemetry",
"version": "1.11.0"
},
"name": "opbeans",
"runtime": {
"name": "Java",
"version": "11.0.8"
},
"language": {
"name": "Java",
"version": "11.0.8"
},
"version": "0.0.1-SNAPSHOT"
},
"data_stream.dataset": "apm",
"host": {
"hostname": "Sylvain-x390",
"os": {
"platform": "Linux"
},
"ip": [
"127.0.0.1"
],
"name": "Sylvain-x390",
"architecture": "amd64"
},
"event": {
"agent_id_status": "missing",
"ingested": "2022-05-06T17:10:53Z",
"outcome": "unknown"
},
"transaction": {
"duration": {
"us": 113244
},
"name": "fake HTTP transaction",
"span_count": {
"dropped": 0,
"started": 0
},
"id": "9318a2109629379d",
"type": "unknown",
"sampled": true
},
"timestamp": {
"us": 1651857042458023
}
},
"fields": {
"transaction.name.text": [
"fake HTTP transaction"
],
"service.framework.version": [
"1.11.0"
],
"service.node.name": [
"Sylvain-x390"
],
"host.hostname": [
"Sylvain-x390"
],
"process.pid": [
1669813
],
"service.language.name": [
"Java"
],
"transaction.sampled": [
true
],
"transaction.id": [
"9318a2109629379d"
],
"host.ip": [
"127.0.0.1"
],
"trace.id": [
"40e28a7812f558120af9a7372a2d9092"
],
"transaction.span_count.dropped": [
0
],
"processor.event": [
"transaction"
],
"agent.name": [
"java"
],
"host.name": [
"Sylvain-x390"
],
"event.agent_id_status": [
"missing"
],
"event.outcome": [
"unknown"
],
"service.environment": [
"local-dev"
],
"service.name": [
"opbeans"
],
"service.framework.name": [
"OpenTelemetry"
],
"process.ppid": [
1669727
],
"data_stream.namespace": [
"default"
],
"processor.name": [
"transaction"
],
"service.runtime.name": [
"Java"
],
"transaction.duration.us": [
113244
],
"service.runtime.version": [
"11.0.8"
],
"observer.hostname": [
"Sylvain-x390"
],
"data_stream.type": [
"traces"
],
"transaction.type": [
"unknown"
],
"host.architecture": [
"amd64"
],
"transaction.span_count.started": [
0
],
"event.ingested": [
"2022-05-06T17:10:53.000Z"
],
"observer.id": [
"628c5520-eb81-4182-8474-86d00bbbea4a"
],
"timestamp.us": [
1651857042458023
],
"@timestamp": [
"2022-05-06T17:10:42.458Z"
],
"service.version": [
"0.0.1-SNAPSHOT"
],
"observer.ephemeral_id": [
"9858849a-2f9c-4458-a12b-6e3959450095"
],
"observer.version": [
"8.2.0"
],
"host.os.platform": [
"Linux"
],
"observer.type": [
"apm-server"
],
"ecs.version": [
"1.12.0"
],
"data_stream.dataset": [
"apm"
],
"service.language.version": [
"11.0.8"
],
"agent.ephemeral_id": [
"db91d7d9-d337-4dbe-b70d-c83f252b20d0"
],
"transaction.name": [
"fake HTTP transaction"
],
"agent.version": [
"1.30.2-SNAPSHOT.null"
],
"process.title": [
"/home/sylvain/.sdkman/candidates/java/11.0.8.hs-adpt/bin/java"
]
}
}
APM Server version (
apm-server version): 8.x, tested with 8.2Description of the problem including expected versus actual behavior:
Steps to reproduce:
When capturing an OTel span with the OpenTelemetry SDK, setting the
http.status_codeto200is enough to make the OTel span to be stored as a transaction with the fieldshttp.response.status_codeset to200and `transaction.Java code to reproduce (nothing fancy, just a plain usage of the OTel API), identical in both cases, the sent OTel attributes remain identical.
With the OTel SDK:
event.outcome=successtransaction.result=HTTP 2xxhttp.response.status_code=200with the OTel bridge:
event.outcomeis set tounknownAfter investigating a bit how the transaction/span attributes are inferred from OTel attributes, I think it comes from the fact that the current implementation of APM Server calling
TranslateTransactionandTranslateSpangive lower priority to the OTel fields when they should actually have higher priority.JSON of transaction with the OTel SDK : works as expected
JSON of a transaction captured with Java agent through OTel bridge