The sections below cover some common issues and troubleshooting for AppDynamics for OpenTelemetry.

Spans Not Being Processed

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

Verify the required attributes for outgoing calls

For spans instrumenting an outgoing call, AppDynamics requires unique attributes appended to the Span Object or else the Span will get dropped from the 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.

HTTP

AttributeTypeDescriptionExample(s)Requirement
http.method stringHTTP request methodGET, POST, HEAD Required
http.url stringFull HTTP request URL https://www.foo.bar/search?q=OpenTelemetry#SemConv*Conditional Requirement

http.host 

stringvalue of HTTP host headerwww.example.org

*Conditional Requirement

http.target stringThe 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.ip stringRemote address of the peer127.0.0.1 *Conditional Requirement
net.peer.port intRemote port number80, 8080, 443*Conditional Requirement
net.peer.name stringRemote 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

Database

AttributeTypeDescriptionExample(s)Requirement
db.system stringAn identifier for the database management system (DBMS) product being usedother_sql Required
net.peer.ip stringRemote address of the peer (dotted decimal for IPv4 or RFC5952 for IPv6)127.0.0.1 *Conditional Requirement
net.peer.name stringRemote Hostnameexample.com*Conditional Requirement

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

Messaging Queues

AttributeTypeDescriptionExample(s)Requirement
messaging.system stringA string identifying the Messaging Systemkafka, rabbitmq, rocketmq, activemqRequired
messaging.destination stringThe message destination name. This might be equal to the span name but is required nevertheless.MyQueue, MyTopicRequired

Change the default SpanKind

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());
JAVA

Unknown Language Icon in Flow Map

If the Flow Map displays an Unknown language icon, you may need to set the telemetry.sdk.language resource attribute to your application's language. See Set Resource Attributes to Your Application Language SDKs for more information.