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