Gábor Gyimesi created MINIFICPP-2501:
----------------------------------------

             Summary: Add processorStatuses C2 metric node to FlowInformation
                 Key: MINIFICPP-2501
                 URL: https://issues.apache.org/jira/browse/MINIFICPP-2501
             Project: Apache NiFi MiNiFi C++
          Issue Type: New Feature
            Reporter: Gábor Gyimesi
            Assignee: Gábor Gyimesi


NiFi provides processor status information that is published in the C2 protocol 
heartbeats in MiNiFi Java: 
https://github.com/apache/nifi/blob/main/c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/FlowInfo.java#L32

We should provide the same metrics in C2 (and in other metric publishers) in 
the FlowInformation metric node. To do this the FlowInformation metric node 
should be extended and the serialization appended with the processorStatuses 
JSON node in the following format:
{code:java}
"processorStatuses": [
    {
        "id": "5128e3c8-015a-1000-79ca-83af40ec1990",
        "groupId": "2438e3c8-015a-1000-79ca-83af40ec1990",
        "bytesRead": 0,
        "bytesWritten": 0,
        "flowFilesIn": 0,
        "flowFilesOut": 0,
        "bytesIn": 0,
        "bytesOut": 0,
        "invocations": 0,
        "processingNanos": 0,
        "activeThreadCount": -1,
        "terminatedThreadCount": -1
    },
    {
        "id": "4fe2d51d-076a-49b0-88de-5cf5adf52b8f",
        "groupId": "2438e3c8-015a-1000-79ca-83af40ec1990",
        "bytesRead": 0,
        "bytesWritten": 40,
        "flowFilesIn": 0,
        "flowFilesOut": 4,
        "bytesIn": 0,
        "bytesOut": 40,
        "invocations": 4,
        "processingNanos": 1434605,
        "activeThreadCount": -1,
        "terminatedThreadCount": -1
    }
], {code}
We should also extend the general processor metrics with these new information.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to