Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaxRetries = 13 // ~7' EventDelimiter = '\n' )
View Source
const ( OpLogNamespace = "log_analysis" OpLogComponent = "log_processor" OpLogServiceDim = "service" )
labels for oplog
Variables ¶
View Source
var ( // Session and clients that can be used by components of the log processor Session *session.Session LambdaClient lambdaiface.LambdaAPI S3Uploader s3manageriface.UploaderAPI SqsClient sqsiface.SQSAPI SnsClient snsiface.SNSAPI Config EnvConfig SQSWaitTime int64 // set by env )
View Source
var ( OpLogManager = oplog.NewManager(OpLogNamespace, OpLogComponent) OpLogLambdaServiceDim = zap.String(OpLogServiceDim, "lambda") OpLogS3ServiceDim = zap.String(OpLogServiceDim, "s3") OpLogSNSServiceDim = zap.String(OpLogServiceDim, "sns") OpLogProcessorServiceDim = zap.String(OpLogServiceDim, "processor") OpLogGlueServiceDim = zap.String(OpLogServiceDim, "glue") )
View Source
var ( BytesProcessedLogger = metrics.MustStaticLogger([]metrics.DimensionSet{ { "LogType", }, }, []metrics.Metric{ { Name: "BytesProcessed", Unit: metrics.UnitBytes, }, { Name: "EventsProcessed", Unit: metrics.UnitCount, }, { Name: "CombinedLatency", Unit: metrics.UnitMilliseconds, }, }) )
Functions ¶
Types ¶
type DataStream ¶
type DataStream struct { Reader io.Reader Source *models.SourceIntegration S3ObjectKey string S3Bucket string ContentType string }
DataStream represents a data stream that read by the processor
type EnvConfig ¶ added in v1.2.0
type EnvConfig struct { AwsLambdaFunctionMemorySize int `required:"true" split_words:"true"` ProcessedDataBucket string `required:"true" split_words:"true"` SqsQueueURL string `required:"true" split_words:"true"` SqsDelaySec int64 `required:"true" split_words:"true"` SnsTopicARN string `required:"true" split_words:"true"` }
Click to show internal directories.
Click to hide internal directories.