PHP APM Agent, Custom Labels are not captured

Kibana version:7.17.0

Elasticsearch version:7.17.0

APM Server version:7.17.0

APM Agent language and version:PHP 1.3.1

Browser version:

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

Fresh install or upgraded from other version? upgraded

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): Custom Labels are not included for non sampled transactions but we are expecting labels for non sampled transactions, following is sample code added in PHP application :$transaction->context()->setLabel('my label with string value', 'some text');

Steps to reproduce:

  1. Added custom labels to PHP application and ran the application.
  2. Searched APM transactions from Kibana App and found transactions but no labels and these transactions are non sampled.
  3. Seen the labels for sampled transactions.

Errors in browser console (if relevant):NA

Provide logs and/or server output (if relevant):NA

Hi @vasudeva - welcome to the forum!

The behavior you described is by design - per the online documentation:

... will drop contextual information to reduce the transfer and storage size of the trace

The labels are part of the contextual information that is not captured for non-sampled transactions.

Thank you for your response and this behavior is same for all agents regardless of languages like Java, Go etc..?

You are welcome. Yes, this behavior should be the same for all the agents.

Ok, also observed that the custom labels are still missing for some transactions which are sampled true and when it's transaction.result=HTTP 3xx, is it expected behavior and why?

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