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>

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

 

 

 

Update Span

The Update Span element updates a span already created in the flow, adding tags to add more optional information between the creation and closure of it.

<flow name="datadog-connectorFlow" >
	<datadog-apm:update-span config-ref="Datadog_APM_Config" spanName="Span to be updated"/>
</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 updated

 

x

Activate Span

The Activate Span element sets a span as the new active one, measuring all the current performance in the flow, contains the global configuration and the span name to be activated.

<flow name="datadog-connectorFlow" >
	<datadog-apm:activate-span config-ref="Datadog_APM_Config" spanName="Span to be activated"/>
</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 activated

 

x

 

Finish All

The Finish All element sets all the spans created to finished at once, this operation is executed based on a LIFO structure, contains the Global configuration

<flow name="datadog-connectorFlow" >
	<datadog-apm:finish-all config-ref="Datadog_APM_Config"/>
</flow>

Name

 

Type

 

Description

 

Default Value

 

Required

 

config-ref

Configuration

Global configuration element of the operation

 

x

 

Logger

The Logger element creates information to be logged to the stated span in the Span Name field, sending information that can be consulted in the Datadog APM view, contains the Global configuration, the span name, a message, the logging level to be chosen, and the category. This logger operation is designed to help correlating the produced log with the parent trace Id in Datadog APM.

<flow name="datadog-connectorFlow" >
	<datadog-apm:log config-ref="Datadog_APM_Config" spanName="span to be logged" message="message" category="category of the log" level="ERROR"/>
</flow>

Name

 

Type

 

Description

 

Default Value

 

Required

 

Name

 

Type

 

Description

 

Default Value

 

Required

 

config-ref

Configuration

Global configuration element of the operation

 

x

spanName

String

Name of the span in which the logs will be inserted

 

x

message

String

Message to be inserted in the span

 

x

level

Enumeration, one of:

  • DEBUG

  • ERROR

  • INFO

  • TRACE

  • WARN

Logging level of the log

INFO

 

category

String

Label to classify the log