github-advanced-security[bot] commented on code in PR #16041: URL: https://github.com/apache/druid/pull/16041#discussion_r1554264379
########## indexing-service/src/main/java/org/apache/druid/indexing/common/task/TaskContextEnricher.java: ########## @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.druid.indexing.common.task; + +/** + * The TaskContextEnricher interface enhances Druid tasks by appending contextual information. + * By infusing tasks with additional context, it aims to improve aspects of task management, + * monitoring, and analysis. This contextual information aids in clarifying the intent and + * specifics of tasks within metrics and reporting systems. + */ +public interface TaskContextEnricher +{ + /** + * Augments a task's context with additional information. This method introduces or updates + * context entries to better describe the task. Such enriched context is pivotal for generating + * detailed task reports and for incorporating as dimensions within metrics reporting. It ensures + * tasks are more accurately represented and managed by providing deeper insights into task execution + * and performance. + * + * @param task The Druid task to be augmented with additional context. This process may either + * supplement existing context entries or introduce new ones, thereby refining the + * task's narrative and operational details. + */ + void enrich(Task task); Review Comment: ## Useless parameter The parameter 'task' is never used. [Show more details](https://github.com/apache/druid/security/code-scanning/7227) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
