Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. The metrics service must accept metrics from the OpenHIM in particular format. These metrics will be reported for each transaction that the OpenHIM processes and will be sent directly to the metrics service. The OpenHIM must calculate the metrics for each transaction but it is left up to the metrics service to aggregate these into particular intervalintervals.
  2. The metrics service must process the metrics it receives and store then them in mongodb. It should aggregate the metrics based on a number of different intervals (ie. 1min, 5min, 15min, 1hour, 1day).
  3. The metrics service must provide a mechanism to query for the metrics it has stored for a particular interval for graphing purposes.
  4. The metrics service must provide a mechanism for the visualizer to poll for events that the metrics service has recieved.

...

Code Block
[
	{
		"metricName": "aName",
		"type": "count|ave|min|max"
		"Value": 753
		"timestamp": "??"
	},
	{
		"metricName": "aName",
		"type": "count|ave|min|max"
		"Value": 753
		"timestamp": "??"
	},
	...
]

Or perhaps just:

Code Block
 {
    "_id": "123",
    "status": "Processing|Failed|Completed",
    "clientID": "Musha_OpenMRS",
    "request": {
        "path": "/api/test",
        "headers": {
            "header1": "value1",
            "header2": "value2"
        },
        "querystring": "param1=value1&param2=value2",
        "body": "<HTTP body>",
        "method": "POST",
        "timestamp": "<ISO 8601>"
    },
    "response": {
        "status": 201,
        "body": "<HTTP body>",
        "headers": {
            "header1": "value1",
            "header2": "value2"
        },
        "timestamp": "<ISO 8601>"
    },
    "routes": [
        {
            "name": "<route name>"
            // Same structure as above
            "request": { ... },
            "response": { ... }
        }
    ]
    "orchestrations": [
        {
            "name": "<orchestration name>"
            // Same structure as above
            "request": { ... },
            "response": { ... }
        }
    ]
    "properties": { // optional meta data about a transaction
        "prop1": "value1",
        "prop2": "value2"
    }
}

Metrics Service to MongoDB

...