Datadog Mule Integration 4 APM

XML Reference

Datadog Config

The Datadog APM Global Configuration organizes connection elements such as the host and port, also provides configuration parameters for optional config like the Service Name and the Environment.

<datadog-apm:config name="Datadog_APM_Config" >
    <datadog-apm:connection host="${host}" port="8126" environment="${env}" service="${service}"/>
</datadog-apm:config>
<datadog-apm:config name="Datadog_APM_Config" >
    <datadog-apm:connection host="${host}" port="8126" environment="${env}" service="${service}"/>
</datadog-apm:config>

Parameters

Name

 

Type

 

Description

 

Default Value

 

Required

 

host

String

Host where the Datadog Instance is running

 

x

port

int

Port to connect to the Datadog instance

 

x

service

String

Service name to reference this execution

unnamed-java-app

 

environment

String

label to states the environment where the execution is running

 

 

Operations

Create Span

The Create Span element sets a Span with a name, this span will run as soon as is created in the flow, can have a parent and fields for tags.

<flow name="datadog-connectorFlow" >
    <datadog-apm:create-span config-ref="Datadog_APM_Config" spanName="Span" parent="Parent of this span" method="GET" path="/services/traces" autofinish="false">
        <datadog-apm:tags >
            <datadog-apm:tag key="key" value="value" />
        </datadog-apm:tags>
    </datadog-apm:create-span>
</flow>

Parameters

Name

 

Type

 

Description

 

Default Value

 

Required

 

config-ref

Configuration

Global configuration element of the operation

 

x

spanName

String

Name of the span to be created

 

x

parent

String

Name of a span that will act as the parent of the one created in this operation

 

 

method

String

HTTP Method to be inserted in the span

 

 

path

String

Path to be inserted in the span

 

 

tags

Map

Key-value pair of tags that can be inserted in the span

 

 

autofinish

Checkbox

Indicates if span will be auto finish at the end of the flow

false

 

Finish Span

The Finish Span element finishes a span already created in the flow, sending this span to the Datadog APM view with its respective timestamps, contains the global configuration and the span name to be finished.

<flow name="datadog-connectorFlow" >
    <datadog-apm:finish-span config-ref="Datadog_APM_Config" spanName="Span to be finished" error="false" statusCode="200"/>
</flow>

Parameters

Name

 

Type

 

Description

 

Default Value

 

Required

 

config-ref

Configuration

Global configuration element of te operation

 

x

spanName

String

Name of the span to be finished

 

x

error

Boolean

Check if the span is marked as error

false

 

statusCode

Integer

Set the status code of a span if stated