Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSET-3941 - add mermaid graph #32

Merged
merged 2 commits into from
Jun 7, 2023
Merged
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
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,37 @@ present and future, pursuant to the license of the project.

TODO
- add explanation why we have this architecture - pub/sub, events, buffers, grouping, sessions, DataSet addEvents session limitations, etc.
- convert existing diagram into PlantUML (/docs/img/overview.puml) and embed generated image (/docs/img/overview.png) here
```mermaid
graph TB
subgraph "DataSet API servers"
DataSetApi["/api/addEvents REST endpoint"]
end
subgraph Collector[OpenTelemetry collector]
collector[Processing data]
collector --"consume traces"--> convTraces[Converts OTel structure into events]
collector --"consume logs"--> convLogs[Converts OTel structure into events]

subgraph DataSetExporter
Publisher[Publishes events into topic based on group_by]
convLogs --DataSetClient.AddEvents--> Publisher --propagates errors so that new data are rejected--> convLogs
convTraces --DataSetClient.AddEvents--> Publisher --propagates errors so that new data are rejected--> convTraces

subgraph "DataSet Go - Library"
PubSubEvents[Pub/Sub for events - topic based on group_by]
EventsConsumer[consumes events, stores them in buffers, publishes buffer in topic based on group_by]
PubSubBuffers[Pub/Sub for buffers - topic based on group_by]
BufferConsumer[consumes buffers, calls DataSet API, retries in case of error]
BufferSweeper[Buffer sweeper - publishes old buffers]

Publisher --> PubSubEvents
PubSubEvents --"DataSetClient.ListenAndSendBundlesForKey"--> EventsConsumer
EventsConsumer --> PubSubBuffers
EventsConsumer --> BufferSweeper
BufferSweeper --> PubSubBuffers
PubSubBuffers --"DataSetClient.SendAddEventsBuffer"--> BufferConsumer
BufferConsumer --"propagates errors"--> Publisher
BufferConsumer -."HTTP POST addEvents".-> DataSetApi
end
end
end
```