Skip to content

Commit

Permalink
feat(qix performance): Add fine-grained performance monitoring for ap…
Browse files Browse the repository at this point in the history
…p objects

Implements #320
  • Loading branch information
Göran Sander committed Sep 9, 2024
1 parent d122863 commit 818c702
Show file tree
Hide file tree
Showing 7 changed files with 684 additions and 28 deletions.
82 changes: 82 additions & 0 deletions src/config/production_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,88 @@ Butler-SOS:
category:
- name: qs_log_category
value: unknown
appPerformanceMonitor: # Detailed app performance data extraction from log events
enable: false # Should app performance data be extracted from log events?
appNameLookup: # Should app names be looked up based on app IDs?
enable: true
monitorFilter: # What objects should be monitored? Entire apps or just specific object(s) within some specific app(s)?
# Two kinds of monitoring can be done:
# 1) Monitor all apps, except those listed for exclusion. This is defined in the allApps section.
# 2) Monitor only specific apps. This is defined in the appSpecific section.
# An event will be accepted if it matches any of the rules in the allApps section OR any of the rules in the appSpecific section.
allApps:
enable: false # Should all apps be monitored?
appExclude: # What apps should be excluded from monitoring?
# If both appId and appName are specified, both must match the event's data for it to be considered a match.
- appId: 5b817efe-472d-43ce-8a31-6cce34af7de9
- appName: Sales forecast
- appId: f42d6b16-8faf-45ca-a783-59f9da47db6e
appName: Inventory analysis
objectType:
allObjectTypes: true # Should all object types be monitored?
allObjectTypesExclude: # If allObjectTypes is set to true, the object types in this array are excluded from monitoring.
# someObjectTypesInclude (below) is ignored in that case.
- LoadModelList
- <Unknown>
- linechart
- map
someObjectTypesInclude: # What object types should be included in monitoring?
# Only applicable if allObjectTypes is set to false.
- LoadModelList
- sheet
- barchart
method:
allMethods: true # Should all methods be monitored?
allMethodsExclude: # If allMethods is set to true, the methods in this array are excluded from monitoring.
# someMethodsInclude (below) is ignored in that case.
- Global::OpenApp
- Doc::GetAppLayout
- Doc::CreateSessionObject
someMethodsInclude: # What methods should be included in monitoring?
# Only applicable if allMethods is set to false.
- GenericObject::GetLayout
- GenericObject::GetHyperCubeContinuousData
appSpecific:
enable: false # Should app specific monitoring be done?
app:
- include: # What apps should be monitored?
# If both appId and appName are specified, both must match the event's data for it to be considered a match.
- appId: d7cf16f9-6a95-462a-9ff1-a6d413326de4
- appName: Budget 2025
- appId: 6931136d-c234-4358-a40c-e37153aba7c9
appName: Sales basket analysis
objectType:
allObjectTypes: true # Should all object types be monitored?
allObjectTypesExclude: # If allObjectTypes is set to true, the object types in this array are excluded from monitoring.
# someObjectTypesInclude (below) is ignored in that case.
- table
- map
someObjectTypesInclude: # What object types should be included in monitoring?
# Only applicable if allObjectTypes is set to false.
- sheet
- barchart
- linechart
- map
appObject:
allAppObjects: true # Should all app objects be monitored?
allAppObjectsExclude: # If allAppObjects is set to true, the app objects in this array are excluded from monitoring.
# someAppObjectsInclude (below) is ignored in that case.
- objectId: AaBbCc
- objectId: DdEeFf
someAppObjectsInclude: # What app objects should be included in monitoring?
# Only applicable if allAppObjects is set to false.
- objectId: YJEpPT
method:
allMethods: true # Should all methods be monitored?
allMethodsExclude: # If allMethods is set to true, the methods in this array are excluded from monitoring.
# someMethodsInclude (below) is ignored in that case.
- Global::OpenApp
- Doc::GetAppLayout
- Doc::CreateSessionObject
someMethodsInclude: # What methods should be included in monitoring?
# Only applicable if allMethods is set to false.
- GenericObject::GetLayout
- GenericObject::GetHyperCubeContinuousData
sendToMQTT:
enable: false # Should log events be sent as MQTT messages?
baseTopic: qliksense/logevent # What topic should log events be forwarded to?
Expand Down
1 change: 0 additions & 1 deletion src/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,6 @@ class Settings {

this.logger.verbose('GLOBALS: Init done');

// eslint-disable-next-line no-constructor-return
return instance;
}

Expand Down
63 changes: 63 additions & 0 deletions src/lib/config-file-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,69 @@ export const confifgFileSchema = {
],
},
},
appPerformanceMonitor: {
enable: 'boolean',
appNameLookup: {
enable: 'boolean',
},
monitorFilter: {
allApps: {
enable: 'boolean',
'appExclude?': [
{
'appId?': 'string',
'appName?': 'string',
},
],
objectType: {
allObjectTypes: 'boolean',
'allObjectTypesExclude?': [],
'someObjectTypesInclude?': [],
},
method: {
allMethods: 'boolean',
'allMethodsExclude?': [],
'someMethodsInclude?': [],
},
},
appSpecific: {
enable: 'boolean',
app: [
{
'include?': [
{
'appId?': 'string',
'appName?': 'string',
},
],
objectType: {
allObjectTypes: 'boolean',
'allObjectTypesExclude?': [],
'someObjectTypesInclude?': [],
},
appObject: {
allAppObjects: 'boolean',
'allAppObjectsExclude?': [
{
objectId: 'string',
},
],
'someAppObjectsInclude?': [
{
objectId: 'string',
},
],
},
method: {
allMethods: 'boolean',
'allMethodsExclude?': [],
'someMethodsInclude?': [],
},
},
],
},
},
},
sendToMQTT: {
enable: 'boolean',
baseTopic: 'string',
Expand Down
1 change: 1 addition & 0 deletions src/lib/config-file-verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export async function verifyConfigFile() {
process.exit(1);
}

// ------------------------------
// Verify values of specific config entries

// If InfluxDB is enabled, check if the version is valid
Expand Down
Loading

0 comments on commit 818c702

Please sign in to comment.