Configure your application to show external services or applications

Tanzu Observability by Wavefront can identify Java AWS services and Java databases in the application map view. You can configure your OpenTracing, OpenTelemetry, or Spring Cloud Sleuth application to identify out-of-the-box external services or applications that your service communicates.

This document shows you how to configure external services for your application instrumented with OpenTracing.

Configure Out-of-the-Box AWS and Database Services

Let’s take a look at span tags, SDKs, and libraries that are required if you want to see the AWS and Java database services on the application map view.

External AWS Services for Java Applications

To make Tanzu Observability identify the AWS services:

  1. Configure your application to use the OpenTracing Java AWS SDK, OpenTelemetry, or Spring Cloud Sleuth.
  2. Configure your application to use one or more AWS services.
  3. Instrument your Java application using the Wavefront OpenTracing Java SDK or the Wavefront Java Tracing Agent.
  4. Prepare to send data to Wavefront using the Wavefront proxy or direct ingestion.

Now, you see the AWS external services on the application map.

Example:

Shows the application map view that has two external AWS services.

Required Span Tags

You will see AWS external services on the application map if the spans have the following tags. The values for the span tags are assigned using the Java AWS SDK.

Span Tag Description
component The value java-aws-sdk is assigned by the SDK. Example: component=java-aws-sdk
span.kind The value client is assigned by the SDK to indicate that the client (your application or service) is sending a request to an external service. Example: span.kind=client
peer.service The name of the AWS service that the application or service communicates with is assigned by the SDK.
Example: peer.service=AWSLambda

You can also see the above span tags on the Trace Browser for any span without errors.
Example:

Shows the details of a trace that has the span tags component, span.kind, and peer.service.

External DB Services for Java Applications

To make Tanzu Observability identify the database (DB) services, follow these steps:

  1. Configure your application to use a Java database, such as MySQL, Oracle, or any other database.
  2. Instrument your Java application using the Wavefront OpenTracing Java SDK or the Wavefront Java Tracing Agent.
  3. Prepare to send data to Wavefront using the Wavefront proxy or direct ingestion.

Now, you see the database services on the application map.

Example:

shows the application map with the external services ungrouped. You see the different names you give the database using the db.instance span tag.

Required Span Tags

You will see external database services on the application map if the spans have the following tags. The values for the span tags are assigned using the OpenTracing, OpenTelemetry, or Spring Cloud Sleuth library.

Span Tag Description
component The value java-jdbc is assigned by the library. Example: component=java-jdbc
db.type The type of the database that you configure your application, such as MySQL, Oracle, is assigned by the library. The value assigned here determines the component icon you see when you click on the external database service. Example: db.type=postgresql
A screenshot that shows what you see when click on an external database service on the application map. There is a blue box around the component to highlight it. The components are the icons shown after DB or the database name.
db.instance The name you give your database is assigned by the library. In the screenshot above, the user created a PostgreSQL database and named it stylingDB. Therefore, the library assigns stylingDB to the db.instance span tag. Example: db.instance=stylingDB
span.kind The value client is assigned by the SDK to indicate that the client (your application or service) is sending a request to an external service. Example: span.kind=client

You can also see the above span tags on the Trace Browser for any span without errors.
Example:

Shows the details of a trace that has the span tags component, db.type, and db.instance.

Configure Custom External Services

In addition to the out-of-the-box Java AWS and database service, Tanzu Observability can identify your external applications or service. For example, you can see how your application communicates with an Azure service on the application map. We can identify custom external service only if the required span tags are defined. You can also add optional span tags.

Required Span Tags

Span Tag Description
_outboundExternalService Identifies the direction of the tracing traffic when a service in your application sends requests to an external service.
For example, the delivery service sends requests to an external Redis database. Tanzu Observability now has spans that show this data. Add _outboundExternalService to the existing spans to show that the delivery service is sending requests to the external Redis service.
Shows the direction of the arrow from the delivery service to the Redis external database.
_inboundExternalService Identifies the direction of the tracing traffic when an external service sends requests to a service in your application.
For example, an external load balancer sends requests to the shopping service. Tanzu Observability now has spans that show the shopping service receiving requests. Add _inboundExternalService to the existing spans to show that the external load balancer is sending requests to the shopping service.
Shows the direction of the arrow from the external load balancer service to the shopping service.

Optional Span Tags

Span Tag Description
_externalApplication Defines the name of the application if the external service is on a different application. If you don’t assign a value, the value defaults to the application that emitted the span.
For example, if the shopping service on the beachshirts application receives requests from a load balancer in the Proxy application, you need to define Proxy as the value for this tag. The application map looks as follows:
Show the shopping service of the beachshirts application receiving requests from a load balancer of the proxy applcaition.
_externalHost Use this span tag if the external service is on a different host or container from the service it sends requests to/receives requests from. If you don’t define a value, the value defaults to externalHost.
_externalComponent Use this span tag to add a new component. If you don't define a value, the value defaults to externalComponent.
For example, click a custom external service on the application map and hover over the icons. The name you see is derived from the value you assign this tag.
Shows the nginx icon when you click on the external load balancer
_externalCategory Use this span tag to create a new category. If you don't define a value, the value defaults to externalCategory.

Example

The application map with the custom Redis database, Nginx load balancer, and an out-of-the-box Amazon SNS service.