Skip to content

Commit

Permalink
Whiteboard event tracking prototype (#40)
Browse files Browse the repository at this point in the history
* accommodate new excalidraw version

* version bump

* npm audit fix

* wip

* wip

* wip

* proper logging modes

* rabbit suggestions

* removed unused import

* suggestions

* changed a variable name

* version bump

* audit fix
  • Loading branch information
hero101 authored Oct 25, 2024
1 parent fd1226e commit 9116144
Show file tree
Hide file tree
Showing 23 changed files with 818 additions and 34 deletions.
20 changes: 20 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ rabbitmq:
# heartbeat
heartbeat: ${RABBITMQ_HEARTBEAT}:30

elasticsearch:
host: ${ELASTICSEARCH_URL}
api_key: ${ELASTICSEARCH_API_KEY}
retries: ${ELASTICSEARCH_RETRIES}:3
timeout: ${ELASTICSEARCH_TIMEOUT}:30000
tls:
ca_cert_path: ${ELASTIC_TLS_CA_CERT_PATH}:none
rejectUnauthorized: ${ELASTIC_TLS_REJECT_UNAUTHORIZED}:false

monitoring:
logging:
# A flag setting whether Winston Console transport will be enabled.
Expand All @@ -25,6 +34,17 @@ monitoring:
# The logging format will be in json - useful for parsing
# if disabled - will be in a human-readable form
json: ${LOGGING_FORMAT_JSON}:false
events:
# The index responsible for tracking the whiteboard events happening in a particular session
whiteboard_event_index: ${ELASTIC_INDEX_WHITEBOARD_EVENTS}:whiteboard-change-events
# The amount of logged information
# None = disabled;
# Lite = user + event type;
# Full = user + event type + delta of what was changed
mode: ${WHITEBOARD_EVENTS_LOGGING_MODE}:none
# MILLISECONDS of how long are the events buffered in memory before being sent
interval: ${WHITEBOARD_EVENTS_LOGGING_INTERVAL}:3000


settings:
# application level settings
Expand Down
169 changes: 145 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "whiteboard-collaboration-service",
"version": "0.5.0",
"version": "0.5.1",
"description": "Alkemio Whiteboard Collaboration Service for Excalidraw backend",
"author": "Alkemio Foundation",
"private": false,
Expand All @@ -16,6 +16,7 @@
"test": "jest"
},
"dependencies": {
"@elastic/elasticsearch": "8.12.2",
"@nestjs/common": "^10.0.0",
"@nestjs/config": "^3.2.2",
"@nestjs/core": "^10.0.0",
Expand Down
20 changes: 20 additions & 0 deletions src/config/config.type.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { WhiteboardEventLoggingModeType } from './whiteboard.event.logging.mode';

export interface ConfigType {
rabbitmq: {
connection: {
Expand All @@ -8,11 +10,29 @@ export interface ConfigType {
heartbeat: number;
};
};
elasticsearch: {
host: string;
api_key: string;
retries: number;
timeout: number;
tls: {
ca_cert_path: string | 'none';
rejectUnauthorized: boolean;
};
indices: {
whiteboard_events: string;
};
};
monitoring: {
logging: {
enabled: boolean;
level: string;
json: boolean;
events: {
whiteboard_event_index: string;
interval: number;
mode: WhiteboardEventLoggingModeType;
};
};
};
settings: {
Expand Down
Loading

0 comments on commit 9116144

Please sign in to comment.