Class TracingSqsEventHandler

java.lang.Object
io.opentelemetry.instrumentation.awslambdacore.v1_0.TracingRequestHandler<com.amazonaws.services.lambda.runtime.events.SQSEvent,Void>
io.opentelemetry.instrumentation.awslambdaevents.v2_2.TracingSqsEventHandler
All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestHandler<com.amazonaws.services.lambda.runtime.events.SQSEvent,Void>
Direct Known Subclasses:
TracingSqsEventWrapper, TracingSqsMessageHandler

public abstract class TracingSqsEventHandler extends io.opentelemetry.instrumentation.awslambdacore.v1_0.TracingRequestHandler<com.amazonaws.services.lambda.runtime.events.SQSEvent,Void>
  • Field Summary

    Fields inherited from class io.opentelemetry.instrumentation.awslambdacore.v1_0.TracingRequestHandler

    DEFAULT_FLUSH_TIMEOUT
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    TracingSqsEventHandler(io.opentelemetry.sdk.OpenTelemetrySdk openTelemetrySdk)
    Creates a new TracingSqsEventHandler which traces using the provided OpenTelemetrySdk and has a timeout of 1s when flushing at the end of an invocation.
    protected
    TracingSqsEventHandler(io.opentelemetry.sdk.OpenTelemetrySdk openTelemetrySdk, Duration flushTimeout)
    Creates a new TracingSqsEventHandler which traces using the provided OpenTelemetrySdk and has a timeout of flushTimeout when flushing at the end of an invocation.
    protected
    TracingSqsEventHandler(io.opentelemetry.sdk.OpenTelemetrySdk openTelemetrySdk, Duration flushTimeout, io.opentelemetry.instrumentation.api.instrumenter.Instrumenter<com.amazonaws.services.lambda.runtime.events.SQSEvent,Void> instrumenter)
    Creates a new TracingSqsEventHandler which flushes the provided OpenTelemetrySdk, has a timeout of flushTimeout when flushing at the end of an invocation, and traces using the provided AwsLambdaFunctionInstrumenter.
  • Method Summary

    Modifier and Type
    Method
    Description
    doHandleRequest(com.amazonaws.services.lambda.runtime.events.SQSEvent event, com.amazonaws.services.lambda.runtime.Context context)
     
    protected abstract void
    handleEvent(com.amazonaws.services.lambda.runtime.events.SQSEvent event, com.amazonaws.services.lambda.runtime.Context context)
    Handles a batch of messages.

    Methods inherited from class io.opentelemetry.instrumentation.awslambdacore.v1_0.TracingRequestHandler

    extractHttpHeaders, handleRequest

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TracingSqsEventHandler

      protected TracingSqsEventHandler(io.opentelemetry.sdk.OpenTelemetrySdk openTelemetrySdk)
      Creates a new TracingSqsEventHandler which traces using the provided OpenTelemetrySdk and has a timeout of 1s when flushing at the end of an invocation.
    • TracingSqsEventHandler

      protected TracingSqsEventHandler(io.opentelemetry.sdk.OpenTelemetrySdk openTelemetrySdk, Duration flushTimeout)
      Creates a new TracingSqsEventHandler which traces using the provided OpenTelemetrySdk and has a timeout of flushTimeout when flushing at the end of an invocation.
    • TracingSqsEventHandler

      protected TracingSqsEventHandler(io.opentelemetry.sdk.OpenTelemetrySdk openTelemetrySdk, Duration flushTimeout, io.opentelemetry.instrumentation.api.instrumenter.Instrumenter<com.amazonaws.services.lambda.runtime.events.SQSEvent,Void> instrumenter)
      Creates a new TracingSqsEventHandler which flushes the provided OpenTelemetrySdk, has a timeout of flushTimeout when flushing at the end of an invocation, and traces using the provided AwsLambdaFunctionInstrumenter.
  • Method Details

    • doHandleRequest

      public Void doHandleRequest(com.amazonaws.services.lambda.runtime.events.SQSEvent event, com.amazonaws.services.lambda.runtime.Context context)
      Specified by:
      doHandleRequest in class io.opentelemetry.instrumentation.awslambdacore.v1_0.TracingRequestHandler<com.amazonaws.services.lambda.runtime.events.SQSEvent,Void>
    • handleEvent

      protected abstract void handleEvent(com.amazonaws.services.lambda.runtime.events.SQSEvent event, com.amazonaws.services.lambda.runtime.Context context)
      Handles a batch of messages. Implement this class to do the actual processing of incoming SQS messages.