Cannot view traces using OpenTelemetry Collector in APM

Hi,

I have struggled many hours trying to use the following setup for monitoring traces in Kibana.

[Java application] --> [OpenTelemetry Collector] --> [Elasticsearch] --> [Kibana APM]

I want to use a minimal setup and my understanding is that Otel Collector can send traces directly to Elasticsearch without using APM Server between them and that Kibana APM should be able to read OTEL Specification without mapping the data to APM specification? Is that correct?

Im using the elasticsearch exporter in Otel collector and have tried all kinds of mode for mapping the data. I have tried sending to all different data streams for traces in elastic and data is being stored in trace indexes but I cannot get it do be displayed in the APM UI.

Im using version 8.17.2 or Elastic and Kibana.

Please help! Is there a way of debugging APM to understand why the data is not shown? Im just randomly trying different things but I can't find any error messages or information that explains why it does not display anything.

Following is an example of how one of my traces is stored:

Index: .ds-traces-apm.sampled-8.17.2-2025.02.14-000001

{
  "_index": ".ds-traces-apm.sampled-8.17.2-2025.02.14-000001",
  "_id": "urFwA5UB77mLuQOlyPs3",
  "_version": 1,
  "_source": {
    "@timestamp": "1739519452867.158584",
    "trace_id": "92c2f9f1075a44d4ddd876001bfcfb76",
    "span_id": "117912267e4a8c07",
    "parent_span_id": "cfc352fd6cf07855",
    "name": "hello-operation",
    "kind": "Internal",
    "duration": 1655083,
    "attributes": {
      "http.url": "/hello",
      "http.method": "GET",
      "endpoint": "/hello",
      "http.status_code": 200,
      "span.kind": "server"
    },
    "links": [],
    "status": {
      "code": "Unset"
    },
    "resource": {
      "attributes": {
        "deployment.environment": "production",
        "host.name": "computer-name",
        "service.name": "quarkus-two",
        "service.version": "1.0.0",
        "telemetry.sdk.language": "java",
        "telemetry.sdk.name": "opentelemetry",
        "telemetry.sdk.version": "1.42.1",
        "webengine.name": "Quarkus",
        "webengine.version": "3.18.2"
      }
    },
    "scope": {
      "name": "io.quarkus.opentelemetry"
    }
  },
  "fields": {
    "resource.attributes.telemetry.sdk.name.text": [
      "opentelemetry"
    ],
    "resource.attributes.webengine.version": [
      "3.18.2"
    ],
    "scope.name": [
      "io.quarkus.opentelemetry"
    ],
    "resource.attributes.telemetry.sdk.name": [
      "opentelemetry"
    ],
    "resource.attributes.host.name.text": [
      "computer-name"
    ],
    "resource.attributes.telemetry.sdk.language": [
      "java"
    ],
    "status.code": [
      "Unset"
    ],
    "duration": [
      1655083
    ],
    "resource.attributes.service.version": [
      "1.0.0"
    ],
    "resource.attributes.webengine.name": [
      "Quarkus"
    ],
    "resource.attributes.host.name": [
      "pontuss-MBP"
    ],
    "parent_span_id": [
      "cfc352fd6cf07855"
    ],
    "attributes.http.url": [
      "/hello"
    ],
    "trace_id": [
      "92c2f9f1075a44d4ddd876001bfcfb76"
    ],
    "attributes.endpoint": [
      "/hello"
    ],
    "span_id": [
      "117912267e4a8c07"
    ],
    "kind": [
      "Internal"
    ],
    "attributes.span.kind": [
      "server"
    ],
    "data_stream.type": [
      "traces"
    ],
    "attributes.http.status_code": [
      200
    ],
    "resource.attributes.webengine.name.text": [
      "Quarkus"
    ],
    "@timestamp": [
      "2025-02-14T07:50:52.867Z"
    ],
    "resource.attributes.telemetry.sdk.version": [
      "1.42.1"
    ],
    "attributes.http.method": [
      "GET"
    ],
    "resource.attributes.deployment.environment": [
      "production"
    ],
    "scope.name.text": [
      "io.quarkus.opentelemetry"
    ],
    "data_stream.dataset": [
      "apm.sampled"
    ],
    "name": [
      "hello-operation"
    ],
    "resource.attributes.service.name.text": [
      "quarkus-two"
    ],
    "resource.attributes.service.name": [
      "quarkus-two"
    ]
  }
}
1 Like