Application Logging

interopiO™ provides a service for applications to publish their logs and also provides an associated log viewer.  This same log viewer will also display any system events that were logged by the platform during app launch and use.

Opting in and Token Generation:
In order for an application to publish logs, an admin/Owner needs to login to the interopiO™ admin-console and can opt in during the app registration process or update the app details screen to “Enable application logging”. 

Once an application has opted in to application logging, the application will require a token to be able to publish logs to interopiO™'s logging service.

In both the Proxied launch and Standalone launch, the app receives a token from interopiO™'s auth server. This token has been enhanced to provide information about the appId and if the app has enabled application logging.

Publishing logs: 

Using the token, the application can now POST logs to

https://interopio.com/logging/apps/<accountId>/<environmentId>/<appId>/logs

The format of the logging data object can be:

{ 
        "accountId": "string", (Required) 
        "appId": "string", (Required) 
        "body": "string", (Required - this represents the actual log statement)
        "containsPhi": true, (Required - this indicates if this log has any PHI) 
        "environmentId": "string", (Required) 
        "httpErrorCode": "string", 
        "ipAddress": "string", 
        "labels": "string", 
        "logLevel": "DEBUG", (Required. Acceptable values are: DEBUG, INFO, WARN, ERROR)
        "metadata": "string", 
        "userAgent": "string" 
}

 

Other settings: If the environment on which the application is registered does not support PHI, and the application is attempting to log a statement containing PHI data, then the interopiO logging service will reject this log statement and not save it. 

Viewing logs:

Application logs can be viewed in the interopiO™ admin console which makes a call to interopiO™'s logging service.

These logs can be viewed only when the application has been enabled the application logging in the application details. 

There is also capability to search logs and filter logs by date and logging level.

System logs for proxied launches:

In addition to any logs recorded by the application itself, the interopiO™ platform will log events and errors during the course of a proxied launch.  Nothing is required to set this up, it is enabled by default for all apps activated on one or more gateways requiring a SMART launch proxy.  These logs are viewable alongside application logs.

In addition to logging system events as they occur, interopiO™ will also detect incomplete launches.  In the event that a launch is initiated but an access token is never granted, the platform will detect this pithing 5 minutes and issue a log statement indicating an incomplete launch.

 

Event Logging:

interopiO allows applications to post two very specific events that are used for aiding in capturing application launch times. 

These two events are "App Ready" and "App Launch Complete".

The endpoint and sample event call are as below:

curl --request POST \
  --url https://interopio-dev.com/logging/apps/test/standard-deploy-te/client-creds/event \
  --header 'Authorization: bearer <token to iO>' \
  --header 'Content-Type: application/json' \
  --data '{
	"loggingDto": {
		"appId": "client-creds",
		"accountId": "test",
		"environmentId": "standard-deploy-te",
		"httpErrorCode": "200",
		"body": "body on: app 2022-12-01 14:02:36 -0700",
		"containsPhi": false,
		"sessionId": "sessionId1234",
		"logLevel": "DEBUG"
	},
	"analyticsReportInteropioEvents": {
		"accountId": "test", "environmentId": "standard-deploy-te",
		"gateway_id": null,
		"timestamp": null,
		"url": null,
		"auth_principal_username": null,
		"event_type": "App Ready",
		"cds_service_id": null,
		"cds_service_override_id": null,
		"cds_service_set_id": null,
		"cds_service_invocation_origin": null,
		"cds_service_invocation_tenant": null,
		"num_cards_returned": null,
		"http_response_code": null,
		"duration": 3234,
		"cds_user_in_context": null,
		"cds_patient_in_context": null,
		"cards_returned": null
	}
}'

 

 

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.