opentelemetry-java-instrume.../instrumentation/aws-lambda-1.0/library
Nikita Salnikov-Tarnovski e74ffe2e52
Remove support for java7 from buildscripts (#1229)
* Remove support for java7 from buildscripts

* Remove support for java7 from buildscripts
2020-09-23 15:40:21 +03: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 Remove support for java7 from buildscripts (#1229) 2020-09-23 15:40:21 +03: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.