@@ -60,11 +60,6 @@ def handle(self, event):
60
60
# then rebuild the arn of the monitored lambda using that name.
61
61
if metadata [DD_SOURCE ] == str (AwsEventSource .LAMBDA ):
62
62
self .process_lambda_logs (metadata , aws_attributes )
63
- # The EKS log group contains various sources from the K8S control plane.
64
- # In order to have these automatically trigger the correct pipelines they
65
- # need to send their events with the correct log source.
66
- if metadata [DD_SOURCE ] == str (AwsEventSource .EKS ):
67
- self .process_eks_logs (metadata , aws_attributes )
68
63
# Create and send structured logs to Datadog
69
64
for log in logs ["logEvents" ]:
70
65
merged = merge_dicts (log , aws_attributes .to_dict ())
@@ -183,20 +178,6 @@ def get_state_machine_arn(self, aws_attributes):
183
178
logger .debug ("Unable to get state_machine_arn: %s" % e )
184
179
return ""
185
180
186
- def process_eks_logs (self , metadata , aws_attributes ):
187
- log_stream = aws_attributes .get_log_stream ()
188
- if log_stream .startswith ("kube-apiserver-audit-" ):
189
- metadata [DD_SOURCE ] = "kubernetes.audit"
190
- elif log_stream .startswith ("kube-scheduler-" ):
191
- metadata [DD_SOURCE ] = "kube_scheduler"
192
- elif log_stream .startswith ("kube-apiserver-" ):
193
- metadata [DD_SOURCE ] = "kube-apiserver"
194
- elif log_stream .startswith ("kube-controller-manager-" ):
195
- metadata [DD_SOURCE ] = "kube-controller-manager"
196
- elif log_stream .startswith ("authenticator-" ):
197
- metadata [DD_SOURCE ] = "aws-iam-authenticator"
198
- # In case the conditions above don't match we maintain eks as the source
199
-
200
181
# Lambda logs can be from either default or customized log group
201
182
def process_lambda_logs (self , metadata , aws_attributes ):
202
183
lower_cased_lambda_function_name = self .get_lower_cased_lambda_function_name (
0 commit comments