APM span sample fail to collect on child service using 1.30.0 Java agent

Kibana version: 7.16.1

Elasticsearch version: 7.16.1

APM Server version: 7.16.1

APM Agent language and version: 1.30.0

Browser version:

Original install method (e.g. download page, yum, deb, from source, etc.) and version:

Fresh install or upgraded from other version?

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):

Steps to reproduce:
The parent service is still using Java agent 1.25.0. The child service is upgraded from 1.25.0 to use 1.30.0 and we notice it rarely collect any sample spans now on child service.

Reverting back to 1.25.0 fix the issue.

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):
The following error starts showing up after upgrade child service agent to version 1.30.0

2022-04-13 22:38:14,585 [elastic-apm-server-reporter] WARN  co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - {
  "accepted": 104,
  "errors": [
    {
      "message": "decode error: data read error: v2.transactionRoot.Transaction: v2.transaction.DroppedSpanStats: []v2.transactionDroppedSpanStats: decode slice: expect ],"

In the document I also noticed that dropped_spans_stats array doesn't have comma , between each element assuming make the decode failed?

    "dropped_spans_stats": [
      {
        "destination_service_resource": "sqs.us-east-1.amazonaws.com:443",
        "outcome": "success",
        "duration": {
          "count": 2,
          "sum": {
            "us": 27780
          }
        }
      }
      {
        "destination_service_resource": "example.com:443",
        "outcome": "success",
        "duration": {
          "count": 4,
          "sum": {
            "us": 385481
          }
        }
      }
      {
        "destination_service_resource": "mysql",
        "outcome": "success",
        "duration": {
          "count": 872,
          "sum": {
            "us": 5669348
          }
        }
      }
      {
        "destination_service_resource": "example2.com:443",
        "outcome": "success",
        "duration": {
          "count": 1,
          "sum": {
            "us": 962256
          }
        }
      }
    ]

Is this the problem that caused the span trace sample not being collected on child service? Does it has anything to do with a lower APM agent version 1.25.0 on parent service or it's the issue on 1.30.0 agent itself?
The end point we're seeing problem has lots of span that always exceed max span limit. We're not seeing problem for the end point that doesn't have huge spans.

Also, reverting child service agent back to version 1.25.0 seems to fix the issue and I can see span trace sample collected properly again.

Can you please try with 1.30.1, there was a bug in 1.30.0 span compression that was triggered with async span termination?

Note I confirm the missing commas is a bug, I'll have a snapshot for you to test early next week if you are willing to test that

In fact available now https://apm-ci.elastic.co/job/apm-agent-java/job/apm-agent-java-mbp/job/PR-2589/2/artifact/src/github.com/elastic/apm-agent-java/elastic-apm-agent/target/elastic-apm-agent-1.30.2-SNAPSHOT.jar

Thank you @Jack_Shirazi I will try this out next week and update it here.

BTW, I got another question to ask. Is Error supposed to be captured when exception originated from classes specified in application_packages: only? I found the APM java agent 1.30.0 reported exception thrown from 3rd party lib as well.

@Jack_Shirazi The above link give 404 Not Found to me. When is it going to be available in official release page for download?

Thanks, the artifacts timed out. We'll likely do a release next week including the fix, meantime if you want to test I can regenerate the artifacts

I think I'll wait for the release next week then. thank you.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.