Skip to content

VFL is a hierarchical logging and tracing system designed to make it easy to analyze the flow of operations in complex environment

License

Notifications You must be signed in to change notification settings

kuchuk-borom-debbarma/Visual-Flow-Logger-Framework-OLD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Visual Flow Logger (VFL)

Introduction

Visual Flow Logger (VFL) is a Structured Logging Framework designed to capture and visualize how your applications actually execute. Unlike traditional flat logging that gives you disconnected log entries, VFL creates a hierarchical representation of your program's flow that shows the relationships between different operations and how they unfold over time.

VFL supports distributed tracing, meaning the structured flow can seamlessly span multiple services and systems, giving you a complete picture of complex workflows across your entire architecture.

Getting Started

1. Set up VFLHub

First, you'll need to host VFLHub - the central server that stores and visualizes your logs.

VFLHub Setup Guide β†’

VFLHub provides:

  • Log storage and processing
  • Web-based visualization interface
  • API endpoints for log ingestion

2. Integrate VFL Client Framework

Add the VFL Java Client framework to your project to start structured logging.

Java VFL Client Documentation β†’

The client framework handles:

  • Hierarchical log creation
  • Automatic context management
  • Transmission to VFLHub
  • Cross-service trace correlation

Why VFL?

Traditional logging gives you this:

[INFO] Processing user order
[INFO] Validating payment method
[INFO] Checking inventory 
[INFO] Payment processed
[INFO] Inventory updated
[INFO] Order completed

VFL gives you this structured view:

πŸ“ Process User Order
  β”œβ”€β”€ πŸ“ Starting order processing
  β”œβ”€β”€ πŸ“ Payment Processing (parallel)
  β”‚   β”œβ”€β”€ πŸ“ Validating payment method
  β”‚   β”œβ”€β”€ πŸ“ Contacting payment gateway
  β”‚   └── πŸ“ Payment authorized
  β”œβ”€β”€ πŸ“ Inventory Check (parallel)
  β”‚   β”œβ”€β”€ πŸ“ Checking product availability
  β”‚   └── πŸ“ Stock confirmed
  β”œβ”€β”€ πŸ“ Creating order record
  └── πŸ“ Order #12345 completed

Features

1. Hierarchical Logging

VFL structures your logs in a tree-like hierarchy, making it easy to understand the relationship between different parts of your program execution.

2. Multiple Flow Patterns

VFL can represent the full spectrum of modern application execution patterns:

  • Sequential Flow - Step-by-step operations that happen one after another
  • Parallel Operations - Multiple operations running simultaneously
  • Fire-and-Forget - Background tasks that don't need to report back
  • Rejoining Parallel - Parallel operations that eventually merge back into the main flow
  • Event-Driven - Publisher/subscriber patterns and event-driven architectures
  • Cross-Service Flows - Operations that span multiple microservices or distributed systems

3. Distributed Tracing

VFL's structured approach naturally extends across service boundaries. When Service A calls Service B, VFL maintains the hierarchical structure, showing you:

  • How requests flow between services
  • Timing relationships across your architecture
  • The complete end-to-end journey of complex operations
  • Dependencies and interactions in distributed systems

Design Philosophy

In Visual Flow Logger, everything is represented as Blocks and Logs.

Blocks

Blocks are containers that represent a scope of execution. Each block contains:

  • Unique identifier for linking and referencing
  • Human-readable name describing its purpose
  • Timestamps showing when it started and ended
  • Hierarchical relationships to parent and child blocks

Blocks represent whatever scope makes sense for your application - you decide what constitutes a meaningful boundary.

Logs

Logs are the individual events that happen within blocks:

  • Method entry and exit points
  • Decision points and conditions
  • Data transformations
  • External service calls
  • Error conditions
  • Any other significant events

Logs are chronologically ordered within their block and linked to their containing block for context.

Nested Structure

The power of VFL comes from how blocks and logs work together:

  • Blocks contain logs showing step-by-step execution
  • Logs can reference other blocks, creating hierarchical relationships
  • Child blocks represent sub-operations or deeper detail levels
  • Parent blocks provide context for understanding the bigger picture

This creates a natural tree structure that mirrors how applications actually execute - from high-level business operations down to detailed implementation steps.

Examples

Example 1: Simple Sequential Flow

User Registration Block
β”œβ”€β”€ Log: "Starting user validation"
β”œβ”€β”€ Email Validation Block
β”‚   β”œβ”€β”€ Log: "Checking email format"
β”‚   β”œβ”€β”€ Log: "Email format is valid"
β”‚   β”œβ”€β”€ Log: "Checking if email already exists"
β”‚   └── Log: "Email is available"
β”œβ”€β”€ Password Processing Block
β”‚   β”œβ”€β”€ Log: "Validating password strength"
β”‚   β”œβ”€β”€ Log: "Password meets requirements"
β”‚   β”œβ”€β”€ Log: "Generating password hash"
β”‚   └── Log: "Password hashed successfully"
β”œβ”€β”€ Database Operations Block
β”‚   β”œβ”€β”€ Log: "Creating user record"
β”‚   β”œβ”€β”€ Log: "Saving to users table"
β”‚   └── Log: "User created with ID: 12345"
└── Log: "Registration completed successfully"

Example 2: Parallel Operations with Rejoining

E-commerce Order Processing Block
β”œβ”€β”€ Log: "Processing order #ORD-789"
β”œβ”€β”€ Log: "Starting parallel validations"
β”œβ”€β”€ Payment Authorization Block (⏱️ 1.2s)
β”‚   β”œβ”€β”€ Log: "Validating credit card details"
β”‚   β”œβ”€β”€ Log: "Contacting payment gateway"
β”‚   β”œβ”€β”€ Log: "Payment authorized: $149.99"
β”‚   └── Log: "Transaction ID: TXN-ABC123"
β”œβ”€β”€ Inventory Check Block (⏱️ 0.8s)
β”‚   β”œβ”€β”€ Log: "Checking product availability"
β”‚   β”œβ”€β”€ Log: "Product SKU-001: 15 units available"
β”‚   β”œβ”€β”€ Log: "Product SKU-002: 8 units available"
β”‚   └── Log: "All items in stock - reserving inventory"
β”œβ”€β”€ Log: "Both validations completed - proceeding"
β”œβ”€β”€ Order Creation Block
β”‚   β”œβ”€β”€ Log: "Generating order confirmation"
β”‚   β”œβ”€β”€ Log: "Updating inventory levels"
β”‚   └── Log: "Order record saved"
└── Log: "Order processing completed"

Example 3: Fire-and-Forget Background Operations

User Profile Update Block
β”œβ”€β”€ Log: "Updating profile for user: john_doe"
β”œβ”€β”€ Profile Validation Block
β”‚   β”œβ”€β”€ Log: "Validating profile fields"
β”‚   β”œβ”€β”€ Warning: "Profile image size is large 2.5MB"
β”‚   └── Log: "Validation passed"
β”œβ”€β”€ Database Update Block
β”‚   β”œβ”€β”€ Log: "Updating user_profiles table"
β”‚   └── Log: "Profile updated successfully"
β”œβ”€β”€ Cache Invalidation Block (πŸ”₯ Fire-and-Forget)
β”‚   β”œβ”€β”€ Log: "Invalidating user cache"
β”‚   └── Log: "Cache cleared for user: john_doe"
β”œβ”€β”€ Analytics Tracking Block (πŸ”₯ Fire-and-Forget)
β”‚   β”œβ”€β”€ Log: "Recording profile update event"
β”‚   └── Log: "Event sent to analytics service"
β”œβ”€β”€ Email Notification Block (πŸ”₯ Fire-and-Forget)
β”‚   β”œβ”€β”€ Log: "Preparing profile update email"
β”‚   β”œβ”€β”€ Log: "Sending notification email"
β”‚   └── Log: "Email queued successfully"
└── Log: "Profile update completed - background tasks initiated"

Example 4: Distributed Cross-Service Flow

API Gateway: User Authentication Block
β”œβ”€β”€ Log: "Received login request for: [email protected]"
β”œβ”€β”€ Log: "Routing to authentication service"
β”œβ”€β”€ Auth Service: Validate Credentials Block (🌐 Cross-Service)
β”‚   β”œβ”€β”€ Log: "Processing authentication request"
β”‚   β”œβ”€β”€ Log: "Looking up user in database"
β”‚   β”œβ”€β”€ Password Verification Block
β”‚   β”‚   β”œβ”€β”€ Log: "Retrieving stored password hash"
β”‚   β”‚   β”œβ”€β”€ Log: "Comparing provided password"
β”‚   β”‚   └── Log: "Password verification successful"
β”‚   β”œβ”€β”€ Log: "Calling token service for JWT generation"
β”‚   β”œβ”€β”€ Token Service: Generate JWT Block (🌐 Cross-Service)
β”‚   β”‚   β”œβ”€β”€ Log: "Generating JWT token for user: 12345"
β”‚   β”‚   β”œβ”€β”€ Log: "Setting token expiration: 24 hours"
β”‚   β”‚   β”œβ”€β”€ Log: "Signing token with private key"
β”‚   β”‚   └── Log: "Token generated successfully"
β”‚   β”œβ”€β”€ Log: "Received JWT token from token service"
β”‚   β”œβ”€β”€ Log: "Recording login event in audit log"
β”‚   └── Log: "Authentication completed successfully"
β”œβ”€β”€ Log: "Received successful auth response"
β”œβ”€β”€ Log: "Adding security headers"
β”œβ”€β”€ Log: "Returning JWT to client"
└── Log: "Authentication flow completed - total time: 245ms"

The VFL Advantage

VFL transforms logging from a debugging afterthought into a powerful tool for:

  • Understanding complex systems through clear visual structure
  • Debugging distributed applications with end-to-end trace visibility
  • Performance analysis with timing relationships preserved
  • System monitoring with meaningful operational context
  • Team collaboration through shared understanding of application flow

Whether you're building a simple application or managing a complex distributed system, VFL provides the structured visibility you need to understand, debug, and optimize your software.

About

VFL is a hierarchical logging and tracing system designed to make it easy to analyze the flow of operations in complex environment

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •