Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions web/moduleMapper/schemas.ts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are only needed when running standalone mocks
Else it's taken from the CSV directly 😉

Original file line number Diff line number Diff line change
Expand Up @@ -3572,6 +3572,49 @@ export const FlowCollectorSchema: RJSFSchema | any = {
type: 'boolean',
default: true
},
clientType: {
description:
'`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.',
type: 'string',
default: 'http',
enum: ['http', 'grpc']
},
grpcConfig: {
description:
'`grpcConfig` contains gRPC-specific configuration for the Loki writer.\nThis is only used when `clientType` is set to `grpc`.',
type: 'object',
properties: {
keepAlive: {
description: '`keepAlive` is the gRPC keep-alive interval.',
type: 'string',
default: '30s'
},
keepAliveTimeout: {
description: '`keepAliveTimeout` is the gRPC keep-alive timeout.',
type: 'string',
default: '5s'
},
maxRecvMsgSize: {
description: '`maxRecvMsgSize` is the maximum message size in bytes the gRPC client can receive. Default: 64MB.',
type: 'integer',
default: 67108864,
minimum: 1024,
maximum: 67108864
},
maxSendMsgSize: {
description: '`maxSendMsgSize` is the maximum message size in bytes the gRPC client can send. Default: 16MB.',
type: 'integer',
default: 16777216,
minimum: 1024,
maximum: 67108864
},
useStreaming: {
description: '`useStreaming` enables streaming mode for real-time log pushing when using gRPC.',
type: 'boolean',
default: false
}
}
},
mode: {
description:
'`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',
Expand Down
37 changes: 37 additions & 0 deletions web/src/components/forms/config/uiSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,41 @@ export const FlowCollectorUISchema: UiSchema = {
enable: {
'ui:title': 'Use Loki storage'
},
clientType: {
'ui:title': 'Client type',
'ui:description':
'Protocol to use for sending flows to Loki: http or grpc. gRPC may provide better performance for high-throughput scenarios.'
},
grpcConfig: {
'ui:title': 'gRPC configuration',
'ui:description': 'gRPC-specific configuration for the Loki writer. Only used when clientType is set to grpc.',
'ui:dependency': {
controlFieldPath: ['loki', 'clientType'],
controlFieldValue: 'grpc',
controlFieldName: 'clientType'
},
keepAlive: {
'ui:title': 'Keep alive',
'ui:description': 'gRPC keep-alive interval'
},
keepAliveTimeout: {
'ui:title': 'Keep alive timeout',
'ui:description': 'gRPC keep-alive timeout'
},
maxRecvMsgSize: {
'ui:title': 'Max receive message size',
'ui:description': 'Maximum message size in bytes the gRPC client can receive'
},
maxSendMsgSize: {
'ui:title': 'Max send message size',
'ui:description': 'Maximum message size in bytes the gRPC client can send'
},
useStreaming: {
'ui:title': 'Use streaming',
'ui:description': 'Enable streaming mode for real-time log pushing when using gRPC'
},
'ui:order': ['keepAlive', 'keepAliveTimeout', 'maxRecvMsgSize', 'maxSendMsgSize', 'useStreaming']
},
mode: {
'ui:title': 'Mode'
},
Expand Down Expand Up @@ -1179,6 +1214,8 @@ export const FlowCollectorUISchema: UiSchema = {
},
'ui:order': [
'enable',
'clientType',
'grpcConfig',
'mode',
'manual',
'monolithic',
Expand Down