func processMessage(message LogMessage, executionContext *ExecutionContext, enhancedMetricsEnabled bool, metricTags []string, metricsChan chan []metrics.MetricSample) {
	// Do not send logs or metrics if we can't associate them with an ARN or Request ID
	if !shouldProcessLog(executionContext, message) {
		return
	}

	if message.Type == LogTypePlatformStart {
		executionContext.LastLogRequestID = message.ObjectRecord.RequestID
	}

	if enhancedMetricsEnabled {
		tags := tags.AddColdStartTag(metricTags, executionContext.LastLogRequestID == executionContext.ColdstartRequestID)
		if message.Type == LogTypeFunction {
			serverlessMetrics.GenerateEnhancedMetricsFromFunctionLog(message.StringRecord, message.Time, tags, metricsChan)
		}
		if message.Type == LogTypePlatformReport {
			serverlessMetrics.GenerateEnhancedMetricsFromReportLog(
				message.ObjectRecord.Metrics.InitDurationMs,
				message.ObjectRecord.Metrics.DurationMs,
				message.ObjectRecord.Metrics.BilledDurationMs,
				message.ObjectRecord.Metrics.MemorySizeMB,
				message.ObjectRecord.Metrics.MaxMemoryUsedMB,
				message.Time, tags, metricsChan)
		}
	}

	if message.Type == LogTypePlatformLogsDropped {
		log.Debug("Logs were dropped by the AWS Lambda Logs API")
	}
}
// processMessage performs logic about metrics and tags on the message
processMessage performs logic about metrics and tags on the message
// processMessage performs logic about metrics and tags on the message
func processMessage(message LogMessage, executionContext *ExecutionContext, enhancedMetricsEnabled bool, metricTags []string, metricsChan chan []metrics.MetricSample) {
	if !shouldProcessLog(executionContext, message) {
		return
	}
	if message.Type == LogTypePlatformStart {
		executionContext.LastLogRequestID = message.ObjectRecord.RequestID
	}
	if enhancedMetricsEnabled {
		tags := tags.AddColdStartTag(metricTags, executionContext.LastLogRequestID == executionContext.ColdstartRequestID)
		if message.Type == LogTypeFunction {
			serverlessMetrics.GenerateEnhancedMetricsFromFunctionLog(message.StringRecord, message.Time, tags, metricsChan)
		}
		if message.Type == LogTypePlatformReport {
			serverlessMetrics.GenerateEnhancedMetricsFromReportLog(
				message.ObjectRecord.Metrics.InitDurationMs,
				message.ObjectRecord.Metrics.DurationMs,
				message.ObjectRecord.Metrics.BilledDurationMs,
				message.ObjectRecord.Metrics.MemorySizeMB,
				message.ObjectRecord.Metrics.MaxMemoryUsedMB,
				message.Time, tags, metricsChan)
		}
	}
	if message.Type == LogTypePlatformLogsDropped {
		log.Debug("Logs were dropped by the AWS Lambda Logs API")
	}
}
func processMessage ( message LogMessage , executionContext * ExecutionContext , enhancedMetricsEnabled bool , metricTags [ ] string , metricsChan chan [ ] metrics . MetricSample ) { if ! shouldProcessLog ( executionContext , message ) { return } if message . Type == LogTypePlatformStart { executionContext . LastLogRequestID = message . ObjectRecord . RequestID } if enhancedMetricsEnabled { tags := tags . AddColdStartTag ( metricTags , executionContext . LastLogRequestID == executionContext . ColdstartRequestID ) if message . Type == LogTypeFunction { serverlessMetrics . GenerateEnhancedMetricsFromFunctionLog ( message . StringRecord , message . Time , tags , metricsChan ) } if message . Type == LogTypePlatformReport { serverlessMetrics . GenerateEnhancedMetricsFromReportLog ( message . ObjectRecord . Metrics . InitDurationMs , message . ObjectRecord . Metrics . DurationMs , message . ObjectRecord . Metrics . BilledDurationMs , message . ObjectRecord . Metrics . MemorySizeMB , message . ObjectRecord . Metrics . MaxMemoryUsedMB , message . Time , tags , metricsChan ) } } if message . Type == LogTypePlatformLogsDropped { log . Debug ( " " ) } }
processMessage performs logic about metrics and tags on the message
processMessage performs logic about metrics and tags on the message
// Do not send logs or metrics if we can't associate them with an ARN or Request ID