Spans Not Being Processed

If some spans are not being processed by Splunk AppDynamics, try the following:

Verify the required attributes for outgoing calls

For spans instrumenting an outgoing call, Splunk AppDynamics requires unique attributes appended to the Span Object or else the Span will get dropped from the Splunk AppDynamics pipeline. See the tables below for both required and recommended attributes for spans.

Some attributes are not required but are still highly recommended in order to get a more accurate depiction in the Flow Map.

Table 1. HTTP
AttributeTypeDescriptionExample(s)Requirement
http.methodstringHTTP request methodGET, POST, HEADRequired
http.urlstringFull HTTP request URLhttps://www.foo.bar/search?q=OpenTelemetry#SemConv*Conditional Requirement

http.host

stringvalue of HTTP host headerwww.example.org

*Conditional Requirement

http.targetstringThe full request target as passed in a HTTP request line or equivalent./path/12314/?q=ddds#123*Conditional Requirement
http.schemestringScheme identifying the used protocolhttp, https*Conditional Requirement
net.peer.ipstringRemote address of the peer127.0.0.1*Conditional Requirement
net.peer.portintRemote port number80, 8080, 443*Conditional Requirement
net.peer.namestringRemote hostname or similarexample.comRequired

* Conditional Requirement - One of the following must be included at span creation time:

  • http.url
  • http.scheme , http.host , http.target
  • http.scheme , net.peer.name , net.peer.port , http.target
  • http.scheme , net.peer.ip , net.peer.port , http.target
Table 2. Database
AttributeTypeDescriptionExample(s)Requirement
db.systemstringAn identifier for the database management system (DBMS) product being usedother_sqlRequired
net.peer.ipstringRemote address of the peer (dotted decimal for IPv4 or RFC5952 for IPv6)127.0.0.1*Conditional Requirement
net.peer.namestringRemote Hostnameexample.com*Conditional Requirement

* Conditional Requirement- You need to use either net.peer.ip or net.peer.name.

Table 3. Messaging Queues
AttributeTypeDescriptionExample(s)Requirement
messaging.systemstringA string identifying the Messaging Systemkafka, rabbitmq, rocketmq, activemqRequired
messaging.destinationstringThe message destination name. This might be equal to the span name but is required nevertheless.MyQueue, MyTopicRequired

Change the default SpanKind

Splunk AppDynamics does not process the default span kind INTERNAL. If your implementation is sending INTERNAL spans, those spans will not be reflected in the Controller UI Flow Maps. You must set SpanKind to any of the following alternative span kinds:

  • SERVER - Indicates that the span covers server-side handling of a synchronous RPC or other remote request. This span is often the child of a remote CLIENT span that was expected to wait for a response.
  • CLIENT - Indicates that the span describes a request to some remote service. This span is usually the parent of a remote SERVER span and does not end until the response is received.
  • PRODUCER - Indicates that the span describes the initiators of an asynchronous request. This parent span will often end before the corresponding child CONSUMER span, possibly even before the child span starts. In messaging scenarios with batching, tracing individual messages requires a new PRODUCER span per message to be created.
  • CONSUMER - Indicates that the span describes a child of an asynchronous PRODUCER request.

SERVER and CONSUMER spans are entry spans, whereas CLIENT and PRODUCER spans are exit spans. An entry span must precede an exit span to make the exit calls discoverable. Also, one or more INTERNAL spans can be present between an entry and exit span as long as the entry span precedes the exit span.

See OpenTelemetry Specifications for more information.

Here is an example from OpenTelemetry documentation to set SpanKind to SERVER using the OpenTelemetry SDK (Java):

Span span = tracer.spanBuilder("/resource/path").setSpanKind(SpanKind.SERVER).startSpan();
span.setAttribute("http.method", "GET");
span.setAttribute("http.url", url.toString());