Kibana version:
8.16.1
Elasticsearch version:
8.16.1
APM Server version:
8.16.1
Steps to reproduce:
- I am exporting the following json to the open telemetry collector
{
"resourceSpans": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": {
"stringValue": "my.service"
}
}
]
},
"scopeSpans": [
{
"scope": {
"name": "my.library",
"version": "1.0.0",
"attributes": [
{
"key": "my.scope.attribute",
"value": {
"stringValue": "some scope attribute"
}
}
]
},
"spans": [
{
"traceId": "5B8EFFF798038103D269B633813FC60C",
"spanId": "EEE19B7EC3C1B174",
"parentSpanId": "EEE19B7EC3C1B173",
"name": "I'm a server span",
"startTimeUnixNano": "1544712660000000000",
"endTimeUnixNano": "1544712661000000000",
"kind": 2,
"attributes": [
{
"key": "my.span.attr",
"value": {
"stringValue": "some value"
}
}
]
}
]
}
]
}
]
}
through
curl -X POST localhost:4318/v1/traces -H "Content-Type: application/json" -d @trace.json
2. Traces reach apm server but do not reach Elasticsearch
However, when you use the Opentelemetry SDK, it does reach the collector.
I think the problem may be that apm server cannot work with the Json protobuf encoding format as indicated here feat: support otlp/http JSON protobuf encoding · Issue #12636 · elastic/apm-server · GitHub
but it doesn't make much sense to me, because if I understand correctly, when the collector receives a json it deserializes it and when it exports it, it serializes it again to protobuf. The strangest thing is that by sending the same json that is drawn in the apm server logs, from curl, it is not saved in Elasticsearch, but by the sdk it is. What could be the problem?
In all cases the trace reaches the apm server and does not give errors, but it does not appear in elasticsearch