cryptoe commented on code in PR #16041:
URL: https://github.com/apache/druid/pull/16041#discussion_r1555500307


##########
docs/operations/metrics.md:
##########
@@ -196,8 +196,9 @@ task's `IOConfig` as follows:
 |`false`|`false`|`REPLACE_LEGACY`. The default for JSON-based batch ingestion. 
|
 |`false`|`true`|`REPLACE`|
 
-The `tags` dimension is reported only for metrics emitted from ingestion tasks 
whose ingest spec specifies the `tags`
-field in the `context` field of the ingestion spec. `tags` is expected to be a 
map of string to object.
+The `tags` dimension enhances metrics, task reports, and the Peon 
service/heartbeat metric associated with ingestion tasks. These tags are 
derived from both the ingestion specification—when the `tags` field is 
specified within the task's context—and system-generated sources. The tags 
field within a task's `context` should be a map with string keys and object 
values, facilitating the inclusion of custom metadata. However, tags can also 
be automatically generated and added by the system, providing a comprehensive 
set of metadata for monitoring and analysis purposes.
+
+To further customize and enrich task metadata, developers can implement the 
`TaskContextEnricher` interface. By implementing custom logic within this 
interface, additional context fields can be introduced. This capability allows 
for enhanced observability and management of tasks, as these additional context 
fields can offer deeper insights into task execution, performance, and outcomes.

Review Comment:
   We should also mention that TaskContextProvider runs in the critical path. 
So use carefully. 



##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java:
##########
@@ -697,6 +702,11 @@ private QueryDefinition initializeQueryDefAndState(final 
Closer closer)
         MSQControllerTask.isReplaceInputDataSourceTask(task)
     );
 
+    // propagate the controller's context and tags to the worker task
+    taskContextOverridesBuilder.put(MultiStageQueryContext.CTX_OF_CONTROLLER, 
task.getContext());

Review Comment:
   I am off the opinion it should not be implemented and this change should be 
reverted. 
   



##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java:
##########
@@ -697,6 +702,11 @@ private QueryDefinition initializeQueryDefAndState(final 
Closer closer)
         MSQControllerTask.isReplaceInputDataSourceTask(task)
     );
 
+    // propagate the controller's context and tags to the worker task
+    taskContextOverridesBuilder.put(MultiStageQueryContext.CTX_OF_CONTROLLER, 
task.getContext());

Review Comment:
   Yeah this seems kind of weird. Why would the worker require controller tags. 



-- 
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]

Reply via email to