opentelemetry-java-instrume.../instrumentation/aws-lambda-1.0/library
Anuraag Agrawal 9635a5e84f
Force flush after finishing lambda function. (#1204)
* Force span flush after lambda invocation.

* Force flush after finishing lambda function.

* bleh

* Better revert

* Accessor

* OpenTelemetrySdkAccess
2020-09-17 14:26:24 +09:00
..
src Force flush after finishing lambda function. (#1204) 2020-09-17 14:26:24 +09:00
README.md Add initial baseline instrumentation for AWS lambda runtime. (#1192) 2020-09-14 12:57:51 +09:00
aws-lambda-1.0-library.gradle Force flush after finishing lambda function. (#1204) 2020-09-17 14:26:24 +09:00

README.md

AWS Lambda Instrumentation

This package contains libraries to help instrument AWS lambda functions in your code.

To use the instrumentation, replace your function classes that implement RequestHandler with those that extend TracingRequestHandler. You will need to change the method name to doHandleRequest.

public class MyRequestHandler extends TracingRequestHandler<String, String> {
  // Note the method is named doHandleRequest instead of handleRequest.
  @Override
  protected String doHandleRequest(String input, Context context) {
    if (input.equals("hello")) {
      return "world";
    }
    return "goodbye";
  }
}

A SERVER span will be created with the name you specify for the function when deploying it.