Class DatadogApiClient
- java.lang.Object
-
- org.datadog.jenkins.plugins.datadog.clients.DatadogApiClient
-
- All Implemented Interfaces:
DatadogClient
public class DatadogApiClient extends Object implements DatadogClient
This class is used to collect all methods that has to do with transmitting data to Datadog.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.datadog.jenkins.plugins.datadog.DatadogClient
DatadogClient.Status
-
-
Field Summary
Fields Modifier and Type Field Description static booleanCOMPRESS_REQUEST
-
Constructor Summary
Constructors Constructor Description DatadogApiClient(String url, String logIntakeUrl, String webhookIntakeUrl, Secret apiKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LogWriteStrategycreateLogWriteStrategy()TraceWriteStrategycreateTraceWriteStrategy()booleanequals(Object o)booleanevent(DatadogEvent event)Sends an event to the Datadog API, including the event payload.inthashCode()MetricsClientmetrics()booleanserviceCheck(String name, DatadogClient.Status status, String hostname, Map<String,Set<String>> tags)Sends a service check to the Datadog API, including the check name, and status.
-
-
-
Field Detail
-
COMPRESS_REQUEST
public static final boolean COMPRESS_REQUEST
- See Also:
- Constant Field Values
-
-
Method Detail
-
event
public boolean event(DatadogEvent event)
Description copied from interface:DatadogClientSends an event to the Datadog API, including the event payload.- Specified by:
eventin interfaceDatadogClient- Parameters:
event- - a DatadogEvent object- Returns:
- a boolean to signify the success or failure of the HTTP POST request.
-
metrics
public MetricsClient metrics()
- Specified by:
metricsin interfaceDatadogClient
-
serviceCheck
public boolean serviceCheck(String name, DatadogClient.Status status, String hostname, Map<String,Set<String>> tags)
Description copied from interface:DatadogClientSends a service check to the Datadog API, including the check name, and status.- Specified by:
serviceCheckin interfaceDatadogClient- Parameters:
name- - A String with the name of the service check to record.status- - An Status with the status code to record for this service check.hostname- - A String with the hostname to submit.tags- - A Map containing the tags to submit.- Returns:
- a boolean to signify the success or failure of the HTTP POST request.
-
createLogWriteStrategy
public LogWriteStrategy createLogWriteStrategy()
- Specified by:
createLogWriteStrategyin interfaceDatadogClient
-
createTraceWriteStrategy
public TraceWriteStrategy createTraceWriteStrategy()
- Specified by:
createTraceWriteStrategyin interfaceDatadogClient
-
-