Skip to content

Commit 0379c33

Browse files
add new fields to schemas
1 parent a2111c7 commit 0379c33

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

web/moduleMapper/schemas.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3572,6 +3572,49 @@ export const FlowCollectorSchema: RJSFSchema | any = {
35723572
type: 'boolean',
35733573
default: true
35743574
},
3575+
clientType: {
3576+
description:
3577+
'`clientType` specifies the protocol to use for sending flows to Loki: `http` or `grpc`.\nThis setting is independent of the Loki installation mode and allows choosing the optimal transport protocol.\ngRPC may provide better performance for high-throughput scenarios.',
3578+
type: 'string',
3579+
default: 'http',
3580+
enum: ['http', 'grpc']
3581+
},
3582+
grpcConfig: {
3583+
description:
3584+
'`grpcConfig` contains gRPC-specific configuration for the Loki writer.\nThis is only used when `clientType` is set to `grpc`.',
3585+
type: 'object',
3586+
properties: {
3587+
keepAlive: {
3588+
description: '`keepAlive` is the gRPC keep-alive interval.',
3589+
type: 'string',
3590+
default: '30s'
3591+
},
3592+
keepAliveTimeout: {
3593+
description: '`keepAliveTimeout` is the gRPC keep-alive timeout.',
3594+
type: 'string',
3595+
default: '5s'
3596+
},
3597+
maxRecvMsgSize: {
3598+
description: '`maxRecvMsgSize` is the maximum message size in bytes the gRPC client can receive. Default: 64MB.',
3599+
type: 'integer',
3600+
default: 67108864,
3601+
minimum: 1024,
3602+
maximum: 67108864
3603+
},
3604+
maxSendMsgSize: {
3605+
description: '`maxSendMsgSize` is the maximum message size in bytes the gRPC client can send. Default: 16MB.',
3606+
type: 'integer',
3607+
default: 16777216,
3608+
minimum: 1024,
3609+
maximum: 67108864
3610+
},
3611+
useStreaming: {
3612+
description: '`useStreaming` enables streaming mode for real-time log pushing when using gRPC.',
3613+
type: 'boolean',
3614+
default: false
3615+
}
3616+
}
3617+
},
35753618
mode: {
35763619
description:
35773620
'`mode` must be set according to the installation mode of Loki:\n- Use `LokiStack` when Loki is managed using the Loki Operator\n- Use `Monolithic` when Loki is installed as a monolithic workload\n- Use `Microservices` when Loki is installed as microservices, but without Loki Operator\n- Use `Manual` if none of the options above match your setup',

web/src/components/forms/config/uiSchema.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,40 @@ export const FlowCollectorUISchema: UiSchema = {
993993
enable: {
994994
'ui:title': 'Use Loki storage'
995995
},
996+
clientType: {
997+
'ui:title': 'Client type',
998+
'ui:description': 'Protocol to use for sending flows to Loki: http or grpc. gRPC may provide better performance for high-throughput scenarios.'
999+
},
1000+
grpcConfig: {
1001+
'ui:title': 'gRPC configuration',
1002+
'ui:description': 'gRPC-specific configuration for the Loki writer. Only used when clientType is set to grpc.',
1003+
'ui:dependency': {
1004+
controlFieldPath: ['loki', 'clientType'],
1005+
controlFieldValue: 'grpc',
1006+
controlFieldName: 'clientType'
1007+
},
1008+
keepAlive: {
1009+
'ui:title': 'Keep alive',
1010+
'ui:description': 'gRPC keep-alive interval'
1011+
},
1012+
keepAliveTimeout: {
1013+
'ui:title': 'Keep alive timeout',
1014+
'ui:description': 'gRPC keep-alive timeout'
1015+
},
1016+
maxRecvMsgSize: {
1017+
'ui:title': 'Max receive message size',
1018+
'ui:description': 'Maximum message size in bytes the gRPC client can receive'
1019+
},
1020+
maxSendMsgSize: {
1021+
'ui:title': 'Max send message size',
1022+
'ui:description': 'Maximum message size in bytes the gRPC client can send'
1023+
},
1024+
useStreaming: {
1025+
'ui:title': 'Use streaming',
1026+
'ui:description': 'Enable streaming mode for real-time log pushing when using gRPC'
1027+
},
1028+
'ui:order': ['keepAlive', 'keepAliveTimeout', 'maxRecvMsgSize', 'maxSendMsgSize', 'useStreaming']
1029+
},
9961030
mode: {
9971031
'ui:title': 'Mode'
9981032
},
@@ -1179,6 +1213,8 @@ export const FlowCollectorUISchema: UiSchema = {
11791213
},
11801214
'ui:order': [
11811215
'enable',
1216+
'clientType',
1217+
'grpcConfig',
11821218
'mode',
11831219
'manual',
11841220
'monolithic',

0 commit comments

Comments
 (0)