Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-2210

Update aerogear-app-metrics service to parse and store idm/self-defence metrics

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None

      Steps to Complete

      • Find out the exact structure of the idm metrics sent by the SDKs
      • Update the Server Side Implementation to accept the idm metrics
      • Update/Create the relevant tests

      Additional Context

      Once the SDK implementation of the idm/self defence metrics is complete, the client payload sent to the server will look like this:

      {
        "clientId": "453de743207a0232a339a23e5d64b289",
        "timestamp": "8377194421",
        "data": {
          "app": {
            "id": "com.example.someApp",
            "sdkVersion": "2.4.6",
            "appVersion": "256"
          },
          "device": {
            "platform": "android",
            "platformVersion": "27"
          },
          "idm": {
            .. // idm metrics
          }
        }
      }
      

      The entire data field in the payload is saved as a JSONB column in the database, however it is first parsed into a Golang struct in the app metrics service. Any fields not defined in the struct are lost. The Metric struct is defined here: https://github.com/aerogear/aerogear-app-metrics/blob/master/pkg/mobile/types.go

      The MetricData struct maps to the data field in the payload. This should be updated to look something like:

      type MetricData struct {
      	App    *AppMetric    `json:"app,omitempty"`
      	Device *DeviceMetric `json:"device,omitempty"`
              IDM    *IDMMetric    `json: "idm,omitempty"`
      }
      

      Where IDMMetric is a new struct that defines the structure of the IDM metrics sent by the clients

            pahayes@redhat.com Dara Hayes (Inactive)
            pahayes@redhat.com Dara Hayes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 1 day
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified