Class SQSHeaderable

  • All Implemented Interfaces:
    Headerable

    public class SQSHeaderable
    extends java.lang.Object
    implements Headerable
    SQSHeaderable extracts DD's attributes from SQS Events. The conventions are mirrored to those defined in datadog-lambda-js library.
    • Constructor Summary

      Constructors 
      Constructor Description
      SQSHeaderable​(com.amazonaws.services.lambda.runtime.events.SQSEvent event)
      Given an SQS Event without any records or datadog attributes produces an empty Headerable.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> getHeaders()  
      void setHeaders​(java.util.Map<java.lang.String,​java.lang.String> headers)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DATADOG_ATTRIBUTE_NAME

        public static final java.lang.String DATADOG_ATTRIBUTE_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • SQSHeaderable

        public SQSHeaderable​(com.amazonaws.services.lambda.runtime.events.SQSEvent event)
        Given an SQS Event without any records or datadog attributes produces an empty Headerable. Otherwise - look up the first record and extract the attributes from it.
        Parameters:
        event - SQS Event
    • Method Detail

      • getHeaders

        public java.util.Map<java.lang.String,​java.lang.String> getHeaders()
        Specified by:
        getHeaders in interface Headerable
      • setHeaders

        public void setHeaders​(java.util.Map<java.lang.String,​java.lang.String> headers)
        Specified by:
        setHeaders in interface Headerable