public class DDLambda
extends java.lang.Object
| Constructor and Description |
|---|
DDLambda(com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent req,
com.amazonaws.services.lambda.runtime.Context cxt)
Create a trace-enabled DDLambda instrumenter given an APIGatewayProxyRequestEvent and a Lambda context
|
DDLambda(com.amazonaws.services.lambda.runtime.events.APIGatewayV2ProxyRequestEvent req,
com.amazonaws.services.lambda.runtime.Context cxt)
Create a trace-enabled DDLambda instrumenter given an APIGatewayV2ProxyEventRequest and a Lambda context
|
DDLambda(com.amazonaws.services.lambda.runtime.Context cxt)
Create a new DDLambda instrumenter given some Lambda context
|
DDLambda(Headerable req,
com.amazonaws.services.lambda.runtime.Context cxt)
Create a trace-enabled DDLambda instrumenter given a custom request object.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.http.client.methods.HttpUriRequest |
addTraceHeaders(org.apache.http.client.methods.HttpUriRequest httpRequest)
Adds Datadog trace header to an org.apache.http.client.methods.HttpUriRequest, so you can trace downstream HTTP requests.
|
okhttp3.Request |
addTraceHeaders(okhttp3.Request request)
Adds Datadog trace header to an OKHttp3 request, so you can trace downstream HTTP requests.
|
java.net.URLConnection |
addTraceHeaders(java.net.URLConnection urlConnection)
Adds Datadog trace headers to a java.net.URLConnection, so you can trace downstream HTTP requests.
|
void |
error(com.amazonaws.services.lambda.runtime.Context cxt)
error increments the aws.lambda.enhanced.error metric in Datadog.
|
org.apache.http.client.methods.HttpGet |
makeHttpGet(java.lang.String url)
Creates an Apache HttpGet instrumented with Datadog trace headers.
|
okhttp3.Request.Builder |
makeRequestBuilder()
Create an OKHttp3 request builder with Datadog headers already added.
|
java.net.URLConnection |
makeUrlConnection(java.net.URL url)
openConnection calls openConnection on the provided URL, adds the Datadog trace headers, and then returns the
resulting URLConnection.
|
void |
metric(java.lang.String name,
double value,
java.util.Map<java.lang.String,java.lang.Object> tags)
metric allows the user to record their own custom metric that will be sent to Datadog.
|
void |
metric(java.lang.String name,
double value,
java.util.Map<java.lang.String,java.lang.Object> tags,
java.util.Date date)
metric allows the user to record their own custom metric that will be sent to Datadog.
|
public DDLambda(com.amazonaws.services.lambda.runtime.Context cxt)
cxt - Enhanced Metrics pulls information from the Lambda context.public DDLambda(com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent req,
com.amazonaws.services.lambda.runtime.Context cxt)
req - Your Datadog trace headers are pulled from the request and sent to XRay for consumption by the
Datadog Xray Crawlercxt - Enhanced Metrics pulls information from the Lambda context.public DDLambda(com.amazonaws.services.lambda.runtime.events.APIGatewayV2ProxyRequestEvent req,
com.amazonaws.services.lambda.runtime.Context cxt)
req - Your Datadog trace headers are pulled from the request and sent to XRay for consumption by the
Datadog Xray Crawlercxt - Enhanced Metrics pulls information from the Lambda context.public DDLambda(Headerable req, com.amazonaws.services.lambda.runtime.Context cxt)
req - A custom request object that implements Headerable. Datadog trace headers are pulled from this request object.cxt - Enhanced Metrics pulls information from the Lambda context.public void metric(java.lang.String name,
double value,
java.util.Map<java.lang.String,java.lang.Object> tags)
name - The metric's namevalue - The metric's valuetags - A map of tags to be assigned to the metricpublic void metric(java.lang.String name,
double value,
java.util.Map<java.lang.String,java.lang.Object> tags,
java.util.Date date)
name - The metric's namevalue - The metric's valuetags - A map of tags to be assigned to the metricdate - The date under which the metric value will appear in datadogpublic void error(com.amazonaws.services.lambda.runtime.Context cxt)
cxt - The AWS Context provided to your handlerpublic java.net.URLConnection makeUrlConnection(java.net.URL url)
throws java.io.IOException
url - the URL to which you want to open a connection.java.io.IOExceptionpublic java.net.URLConnection addTraceHeaders(java.net.URLConnection urlConnection)
urlConnection - the URLConnection that will have the trace headers added to it.public org.apache.http.client.methods.HttpGet makeHttpGet(java.lang.String url)
url - The URL that will eventually be gotten.public org.apache.http.client.methods.HttpUriRequest addTraceHeaders(org.apache.http.client.methods.HttpUriRequest httpRequest)
httpRequest - the HttpUriRequest that will have the trace headers added to it.public okhttp3.Request.Builder makeRequestBuilder()
public okhttp3.Request addTraceHeaders(okhttp3.Request request)
request - The OKHttp3 Request that will have the trace headers added to it.