Log Format

Ontoserver is configured to produce log messages that can be used to monitor the usage of the server’s FHIR API. These log messages are formatted as JSON objects, to facilitate parsing and analysis by programs such as elasticsearch.

The log messages produced are:

  • Provider logs
  • HTTP response logs

So, for example, a request such as a GET-style $expand request will generate one log message of each type. By contrast, a batch request containing two $lookup requests will generate three provider logs (one for the batch and two for the $lookup requests), and one HTTP response log (for the batch response).

The content of the JSON log message objects is described below.

HTTP response logs

HTTP response logs contain the following fields.

Field Content
uuid A unique identifier for the request
ontoserverFhirBase The base URL of the FHIR server (if one has been configured)
requestVerb The HTTP request verb (e.g. GET, POST, PUT, DELETE) of the request
servletPath The path part of the request URL (excluding URL parameters)
operationType The kind of FHIR request (e.g. create, search-type, extended-operation-instance)
operationName If the request is an operation, the name of the operation (e.g. expand, lookup)
id If the request is an instance-level request, the id of the resource
resourceName If the request is a type-level or instance-level request, the name of the resource type
requestHeader.accept The Accept HTTP request headers
requestHeader.content_type The Content-Type HTTP request headers
requestHeader.if_none_match The If-None-Match HTTP request headers
requestHeader.origin The Origin HTTP request headers
requestHeader.prefer The Prefer HTTP request headers
requestHeader.referer The Referer HTTP request headers
requestHeader.user_agent The User-Agent HTTP request headers
requestHeader.x_forwarded_for The X-Forwarded-For HTTP request headers
requestHeader.x_forwarded_for The X-Intermediary HTTP request headers
requestHeader.x_forwarded_host The X-Forwarded-Host HTTP request headers
remoteAddr The originating IP address of the request
requestParameters The URL parameters part of the request URL
responseEncodingNoDefault The mime type (e.g. application/fhir+json, application/fhir+xml) after resolution of defaults
requestUrl The requested URL (excluding URL parameters)
time_ms The time (in ms) taken by the server to process the request
responseStatus The HTTP response status (e.g. 200, 304, 422)
exceptionMessage If the request generated an exception, the message describing the exception

Provider logs

The following fields are common to all provider logs.

Field Description
start_ms The time the provider received the request
uuid The uuid of the corresponding HTTP request/response logs
providerMethod The provider method (e.g. search, create, $lookup)
end_ms The time the provider finished processing the request

Batch

Batch requests have the providerMethod $transaction, and have the following additional fields.

Field Description
type The type of batch request (e.g. batch, transaction)
entries The number of entries in the batch

Closure

Closure requests have the providerMethod $closure, and have the following additional fields.

Field Description
name The name of the closure
version The version of the closure
codings The number of (new) codings in the closure request

Create

Create requests (for CodeSystem, ConceptMap or ValueSet) have the providerMethod create.

Delete

Delete requests (for CodeSystem, ConceptMap or ValueSet) have the providerMethod delete, and have the following additional fields.

Field Description
id The id of the resource being deleted

Expand

Expand requests have the providerMethod $expand (for type-level requests) or $expand-instance (for type-level requests), and have the following additional fields.

Field Description
id The id of the ValueSet (for instance-level only)
url The url parameter (for type-level only)
identifier The (legacy) identifier parameter (for type-level only)
filter The filter parameter
profile The profile parameter
offset The offset parameter
count The count parameter
size the number of concepts returned in the expansion
total the total number of concepts in the expansion

Lookup

Lookup requests have the providerMethod $lookup, and have the following additional fields.

Field Description
system The system parameter
code The code parameter

Metadata

Metadata (CapabilityStatement) requests have the providerMethod metadata.

Read

Read requests (for CodeSystem, ConceptMap or ValueSet) have the providerMethod read, and have the following additional fields.

Field Description
id The id of the resource

Search

Search requests (for CodeSystem, ConceptMap or ValueSet), including requests with no search parameters (“get all”) have the providerMethod search, and have the following additional fields.

Field Description
description The description search parameter
identifier The identifier search parameter
name The name search parameter
system The system search parameter
url The url search parameter
version The version search parameter
idParam The id search parameter
results The number of search results

Subsumes

Subsumes requests have the providerMethod $subsumes (for type-level requests) or $subsumes-instance (for type-level requests), and have the following additional fields.

Field Description
codeA The codeA parameter
codeB The codeB parameter
version The version parameter
codingA The codingA parameter
codingB The codingB parameter
outcome The outcome of the request (e.g. subsumes, subsumed-by)

Translate

Translate requests have the providerMethod $translate (for type-level requests) or $translate-instance (for type-level requests), and have the following additional fields.

Field Description
id The id of the ConceptMap (for instance-level only)
code The code parameter
system The system parameter
source The source parameter
valueSet The valueSet parameter
target The target parameter
reverse The reverse parameter
result the resulting translated code

Update

Update requests (for CodeSystem, ConceptMap or ValueSet) have the providerMethod update, and have the following additional fields.

Field Description
id The id of the resource being updated

Validate

Validate requests (for CodeSystem, ConceptMap or ValueSet) have the providerMethod $validate (for type-level requests) or $validate-instance (for type-level requests), and have the following additional fields.

Field Description
id The id of the resource being validated

Validate-code

Validate-code requests have the providerMethod $validate-code (for type-level requests) or $validate-code-instance (for type-level requests), and have the following additional fields.

Field Description
id The id of the ValueSet (for instance-level only)
url The url parameter (for type-level only)
code The code parameter
system The system parameter
version The version parameter
display The display parameter
result The result of the operation (true or false)

VRead

Versioned read requests (for CodeSystem, ConceptMap or ValueSet) have the providerMethod vread, and have the following additional fields.

Field Description
id The id of the resource
version The version of the resource