Type | Read/write | Author | Availability |
Read | Finbourne | Provided with LUSID |
The Lusid.Logs.Error
provider enables you to write a Luminesce SQL query that retrieves HTTP 5xx server error responses to LUSID.
Note: The LUSID user running the query must have sufficient access control permissions to both use the provider and read application request logs stored in LUSID. This should automatically be the case if you are the domain owner.
See also: Lusid.Logs.Failure
, Lusid.Logs.AppRequest
Basic usage
select * from Lusid.Logs.Error where <filter-expression>;
Query parameters
Lusid.Logs.Error
has parameters that enable you to filter or refine a query.
To list available parameters, their data types, default values, and an explanation for each, run the following query using a suitable tool:
select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Lusid.Logs.Error' and FieldType = 'Parameter';
Data fields
By default, Lusid.Logs.Error
returns a table of data populated with particular fields (columns). You can return a subset of these fields.
To list fields available to return, their data types, whether fields are considered 'main', and an explanation for each, run the following query using a suitable tool:
select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Lusid.Logs.Error' and FieldType = 'Column';
Note: Fields marked 'main' are returned by queries that start
select ^ from Lusid.Logs.Error
.
Examples
Note: For more example Luminesce SQL queries, visit our Github repo.
Example 1: Retrieve all server error logs between two dates
select * from Lusid.Logs.Error where StartAt = '2023-03-10T00:00:00Z' and EndAt = '2023-03-10T11:59:59Z'
Example 2: Retrieve all server error logs for a user starting from a particular date
select * from Lusid.Logs.Error where User = '00uyi6tvb4yDcFGjM2p8' and StartAt = '2023-03-06T00:00:00Z'
Example 3: Retrieve all server error logs for a method
select * from Lusid.Logs.Error where Method = 'UpsertInstruments'
Example 4: Retrieve all server error logs that start with or contain certain characters
select * from Lusid.Logs.Error where StartAt = #2022-11-01# and (Method like 'Upsert%' or Method like 'Create%')
Example 5: Fetch server error logs over a range of dates
@@dt1 = select datetime('now', '-3 days');
@@dt2 = select datetime('now');
select * from Lusid.Logs.Error
where StartAt = @@dt1
and EndAt = @@dt2
limit 100;