Sparta: Index | Files

package interceptor

import ""

Package interceptor defines Sparta interceptors that tap the event handling workflow.


Package Files

doc.go interceptor.go xray.go xray_build.go


const (
    // XRayMetadataErrValue is the metadata kayname used to store
    // the error value when processing an event
    XRayMetadataErrValue = "error"

    // XRayMetadataErrEvent is the event associated with a lambda
    // function that errors out
    XRayMetadataErrEvent = "event"

    // XRayMetadataRequestID is the AWS request ID that came along with the request
    XRayMetadataRequestID = "reqID"

    // XRayMetadataLogs is the key associated with the logfile entries. All log
    // entries regardless of level will be included in the errLog value
    XRayMetadataLogs = "log"

XRay metadata

const (
    // XRayAttrBuildID is the XRay attribute associated with this
    // service instance. See the official AWS docs at
    // for more information on XRay attributes
    XRayAttrBuildID = "buildID"

XRay attributes

func RegisterXRayInterceptor Uses

func RegisterXRayInterceptor(handler *sparta.LambdaEventInterceptors,
    mode XRayInterceptorMode) *sparta.LambdaEventInterceptors

RegisterXRayInterceptor handles pushing the tracing information into XRay

type XRayInterceptorMode Uses

type XRayInterceptorMode uint32

XRayInterceptorMode represents the mode to use for the XRay interceptor

const (
    // XRayModeErrCaptureErrorValue = is the flag indicating to capture the error
    // value iff it's non-empty
    XRayModeErrCaptureErrorValue XRayInterceptorMode = 1 << iota
    // XRayModeErrCaptureEvent is the flag indicating to capture the input event iff
    // there was an error
    // XRayModeErrCaptureLogs is the flag indicating to capture all logs iff there
    // was an error
    // XRayModeErrCaptureRequestID is the flag indicating to capture the request ID iff there
    // was an error

    // XRayAll is all options
    XRayAll = XRayModeErrCaptureErrorValue |
        XRayModeErrCaptureEvent |
        XRayModeErrCaptureLogs |

Package interceptor imports 7 packages (graph). Updated 2019-02-17. Refresh now. Tools for package owners.