<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sangmin Yoon</title>
    <description>The latest articles on DEV Community by Sangmin Yoon (@sanspareilsmyn).</description>
    <link>https://dev.to/sanspareilsmyn</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F995085%2Ff01fe0d7-238d-4395-8445-85762160e645.jpeg</url>
      <title>DEV Community: Sangmin Yoon</title>
      <link>https://dev.to/sanspareilsmyn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sanspareilsmyn"/>
    <language>en</language>
    <item>
      <title>Tired of `kubectl port-forward`? Simplify Kubernetes Local Dev with kforward!</title>
      <dc:creator>Sangmin Yoon</dc:creator>
      <pubDate>Mon, 14 Apr 2025 15:05:33 +0000</pubDate>
      <link>https://dev.to/sanspareilsmyn/tired-of-kubectl-port-forward-simplify-kubernetes-local-dev-with-kforward-36ka</link>
      <guid>https://dev.to/sanspareilsmyn/tired-of-kubectl-port-forward-simplify-kubernetes-local-dev-with-kforward-36ka</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F47n1babryzl2y9v0rp5z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F47n1babryzl2y9v0rp5z.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sanspareilsmyn/kforward" rel="noopener noreferrer"&gt;https://github.com/sanspareilsmyn/kforward&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hello community! 👋&lt;/p&gt;

&lt;p&gt;If you're developing applications that interact with services running inside a Kubernetes cluster, you've probably felt the pain. Managing countless &lt;code&gt;kubectl port-forward&lt;/code&gt; sessions in separate terminals? Trying to remember which local port maps to which service? Hardcoding &lt;code&gt;localhost:PORT&lt;/code&gt; in your configs, only to change it back for deployment? It's a frustrating, error-prone dance.&lt;/p&gt;

&lt;p&gt;That's why I built &lt;strong&gt;kforward&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kforward&lt;/code&gt; is a lightweight, single-binary Go CLI tool designed to streamline your local development workflow against Kubernetes. It acts as a local HTTP proxy that automatically manages &lt;code&gt;kubectl port-forward&lt;/code&gt; processes for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  🤔 The Pain Points kforward Solves
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Tedious Port-Forwarding:&lt;/strong&gt; Opening a new terminal for &lt;em&gt;every single service&lt;/em&gt; you need access to? It's messy, easy to forget one, and doesn't scale as your app grows.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Configuration Chaos:&lt;/strong&gt; Littering your local development config files with &lt;code&gt;localhost:3001&lt;/code&gt;, &lt;code&gt;localhost:9200&lt;/code&gt;, &lt;code&gt;localhost:5433&lt;/code&gt; makes them differ significantly from how your app &lt;em&gt;actually&lt;/em&gt; runs in the cluster, leading to potential "works on my machine" issues.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Complexity Overkill:&lt;/strong&gt; Tools offering deep integration (like network interception or file mirroring) are awesome but can be complex to set up or might be more than you need if you &lt;em&gt;just&lt;/em&gt; want to talk to your backend API or database service.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✨ Enter kforward: Simplicity First
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;kforward&lt;/code&gt; takes a simpler approach.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;🚀 Simple &amp;amp; Reliable:&lt;/strong&gt; It provides a standard HTTP/HTTPS proxy on your local machine. Under the hood, it intelligently uses the battle-tested &lt;code&gt;kubectl port-forward&lt;/code&gt; for the actual tunneling.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;🤖 &lt;code&gt;kubectl&lt;/code&gt; Automation:&lt;/strong&gt; Point &lt;code&gt;kforward&lt;/code&gt; at a specific service (&lt;code&gt;namespace/service-name&lt;/code&gt;) or an entire namespace, and it automatically finds ready pods and starts/manages the required &lt;code&gt;kubectl port-forward&lt;/code&gt; processes in the background. No more manual juggling!&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;📦 Single Go Binary:&lt;/strong&gt; Easy to install and run. Just make sure you have &lt;code&gt;kubectl&lt;/code&gt; installed and in your PATH (kforward uses it!).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;🌐 Use Native Service Names:&lt;/strong&gt; This is the magic! Configure your local app (or just your terminal session) to use the &lt;code&gt;kforward&lt;/code&gt; proxy. Now you can use standard Kubernetes service DNS names like &lt;code&gt;http://my-api.my-namespace.svc.cluster.local:8080&lt;/code&gt; directly in your code or tools like &lt;code&gt;curl&lt;/code&gt;, just like you would inside the cluster.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🏗️ How Does It Work? (The Gist)
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;kforward&lt;/code&gt; runs as a local process that you start from your terminal.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; It reads your &lt;code&gt;kubeconfig&lt;/code&gt; (or uses the context you specify) to talk to your K8s cluster using &lt;code&gt;client-go&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; Based on the services or namespace you target, it figures out which ports need forwarding.&lt;/li&gt;
&lt;li&gt; It launches &lt;code&gt;kubectl port-forward&lt;/code&gt; commands in the background for each required target, mapping them to available local ports (like &lt;code&gt;localhost:10001&lt;/code&gt;, &lt;code&gt;localhost:10002&lt;/code&gt;, etc.). It keeps track of this mapping.&lt;/li&gt;
&lt;li&gt; It starts a local HTTP/HTTPS proxy (defaulting to &lt;code&gt;localhost:1080&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt; You configure your local application or terminal environment to use this proxy (e.g., &lt;code&gt;export http_proxy=http://localhost:1080&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt; When your app makes a request to &lt;code&gt;http://my-service.default.svc.cluster.local&lt;/code&gt;, the request hits the &lt;code&gt;kforward&lt;/code&gt; proxy.&lt;/li&gt;
&lt;li&gt; The proxy identifies the target (&lt;code&gt;my-service.default&lt;/code&gt;) and looks up the corresponding local port (e.g., &lt;code&gt;10001&lt;/code&gt;) managed by a background &lt;code&gt;kubectl&lt;/code&gt; process.&lt;/li&gt;
&lt;li&gt; The proxy forwards the request to &lt;code&gt;localhost:10001&lt;/code&gt;, which the &lt;code&gt;kubectl&lt;/code&gt; process tunnels securely to the actual pod in your cluster.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here's a simplified view:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fku3bwcer1nt59o79app2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fku3bwcer1nt59o79app2.png" alt="Image description" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🙌 Get Involved!
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;kforward&lt;/code&gt; is open source and built to solve a common developer pain point. Give it a try and see if it simplifies &lt;em&gt;your&lt;/em&gt; Kubernetes development workflow!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Check out the code, detailed architecture, and contribute on GitHub:&lt;/strong&gt; [Link to your GitHub Repo]&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Found it useful? Star the repo! ⭐&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Feedback &amp;amp; Ideas:&lt;/strong&gt; Open an issue or join the discussion!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let me know what you think in the comments! How do you currently handle local development against Kubernetes services?&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>developer</category>
      <category>go</category>
      <category>productivity</category>
    </item>
    <item>
      <title>FeatureLens: Real-time Go monitor for ML feature pipeline quality &amp; drift detection.</title>
      <dc:creator>Sangmin Yoon</dc:creator>
      <pubDate>Sun, 13 Apr 2025 15:05:31 +0000</pubDate>
      <link>https://dev.to/sanspareilsmyn/featurelens-real-time-go-monitor-for-ml-feature-pipeline-quality-drift-detection-2f1a</link>
      <guid>https://dev.to/sanspareilsmyn/featurelens-real-time-go-monitor-for-ml-feature-pipeline-quality-drift-detection-2f1a</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/sanspareilsmyn/FeatureLens" rel="noopener noreferrer"&gt;Project Link&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  FeatureLens
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;FeatureLens&lt;/strong&gt; is a lightweight, high-performance monitoring tool designed specifically for real-time Machine Learning feature pipelines. Built with Go, it focuses on detecting data quality issues and drift efficiently, helping you maintain the health and reliability of your MLOps infrastructure. Think of it as a magnifying glass for your live feature data streams.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤔 Why FeatureLens?
&lt;/h2&gt;

&lt;p&gt;Machine Learning models are fundamentally dependent on the quality and consistency of their input features. In production environments, real-time feature pipelines (e.g., feeding feature stores or directly serving models) are critical but vulnerable to silent failures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data Quality Degradation:&lt;/strong&gt; Unexpected null values, outliers, or data type changes can creep in due to upstream
issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Drift:&lt;/strong&gt; The statistical distribution of live features can deviate significantly from the distributions seen
during training, silently harming model performance (Training-Serving Skew).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pipeline Latency:&lt;/strong&gt; Delays in feature calculation or delivery can impact downstream applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While various monitoring solutions exist, they can sometimes be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Resource-Intensive:&lt;/strong&gt; Requiring significant CPU/memory, especially when monitoring numerous features or
high-throughput streams.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Complex to Deploy/Manage:&lt;/strong&gt; Often involving heavy dependencies or intricate setups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batch-Oriented:&lt;/strong&gt; Not ideally suited for detecting issues in truly real-time streams &lt;em&gt;as they happen&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;FeatureLens aims to address these challenges by leveraging Go's strengths:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🚀 High Performance &amp;amp; Concurrency:&lt;/strong&gt; Go's goroutines allow FeatureLens to efficiently monitor multiple Kafka topics/partitions and calculate statistics concurrently with minimal overhead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📉 Low Resource Footprint:&lt;/strong&gt; Consumes significantly fewer resources compared to many Python-based alternatives, making it cost-effective.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📦 Simple Deployment:&lt;/strong&gt; Distributed as a single static binary, making containerization (Docker) and deployment extremely straightforward, without Python environment hassles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⏱️ Real-time Focus:&lt;/strong&gt; Designed from the ground up for low-latency processing of streaming data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By providing timely insights into feature health, FeatureLens helps MLOps teams &lt;strong&gt;detect problems early&lt;/strong&gt;, &lt;strong&gt;reduce debugging time&lt;/strong&gt;, and &lt;strong&gt;increase trust&lt;/strong&gt; in their production ML systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✨ Features (MVP Scope)
&lt;/h2&gt;

&lt;p&gt;The initial Minimum Viable Product (MVP) will focus on delivering the core value proposition with the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kafka Consumer:&lt;/strong&gt; Consume feature data messages from specified Apache Kafka topic(s). Assumes messages are in a
common format (e.g., JSON).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time Statistics Calculation (Per Feature):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Process messages within configurable time windows (e.g., 1-minute tumbling windows).&lt;/li&gt;
&lt;li&gt;Calculate basic data quality metrics for specified feature fields:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Null / Missing Value Rate:&lt;/strong&gt; Percentage of null or missing values.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mean (Numerical Features):&lt;/strong&gt; Average value within the window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Variance / Standard Deviation (Numerical Features):&lt;/strong&gt; Measure of data dispersion.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;(Future: Cardinality for categorical, min/max, etc.)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Threshold-Based Alerting:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Define acceptable thresholds for calculated metrics in a configuration file (
e.g., &lt;code&gt;null_rate &amp;lt; 0.05&lt;/code&gt;, &lt;code&gt;mean between 10 and 20&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Trigger alerts when metrics violate these thresholds.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Simple Logging / Alert Output:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Log calculated metrics periodically.&lt;/li&gt;
&lt;li&gt;Log alerts to standard output (stdout) when thresholds are breached. &lt;em&gt;(Future: Integrate with Slack, PagerDuty,
etc.)&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Configuration:&lt;/strong&gt; Load settings (Kafka brokers, topics, features to monitor, window size, thresholds) from a
configuration file (e.g., YAML) or environment variables.&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  🏗️ Architecture (MVP)
&lt;/h2&gt;

&lt;p&gt;The MVP architecture is designed to be simple and efficient, focusing on Go's strengths in stream processing and concurrency.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+------------------+      Feature Data Stream      +--------------------------------------+      Alerts / Logs
|   Apache Kafka   | ---------------------------&amp;gt; |        FeatureLens (Go Process)      | ---------------------&amp;gt; stdout / Log File
| (Topics/Brokers) |      (e.g., JSON Msgs)       |                                      |
+------------------+                              |  +---------------------------------+ |
                                                  |  | 1. Kafka Consumer               | |
                                                  |  |    (e.g., segmentio/kafka-go)   | |
                                                  |  +---------------------------------+ |
                                                  |                  |                   |
                                                  |  +---------------------------------+ |      +-----------------+
                                                  |  | 2. Message Parser/Validator     |-----&amp;gt;|  Configuration  |
                                                  |  +---------------------------------+ |      | (YAML/Env Vars) |
                                                  |                  |                   |      +-----------------+
                                                  |  +---------------------------------+ |
                                                  |  | 3. Stats Calculator (Windowed)  | |
                                                  |  |    - Null Rate                   | |
                                                  |  |    - Mean/Variance               | |
                                                  |  +---------------------------------+ |
                                                  |                  |                   |
                                                  |  +---------------------------------+ |
                                                  |  | 4. Threshold Checker &amp;amp; Alerter  | |
                                                  |  +---------------------------------+ |
                                                  +--------------------------------------+

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Components:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Kafka Consumer:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Utilizes a robust Go Kafka client library (e.g., &lt;code&gt;segmentio/kafka-go&lt;/code&gt; or &lt;code&gt;confluent-kafka-go&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Connects to specified Kafka brokers and consumes messages efficiently from target topic(s).&lt;/li&gt;
&lt;li&gt;Handles partitioning and consumer group offset management automatically.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Message Parser/Validator:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decodes incoming messages (MVP assumes &lt;strong&gt;JSON&lt;/strong&gt; format) into a predefined Go struct.&lt;/li&gt;
&lt;li&gt;Performs basic &lt;strong&gt;validation&lt;/strong&gt; to ensure required fields for monitoring are present and have expected basic types.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Stats Calculator (Windowed):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The core engine responsible for &lt;strong&gt;real-time aggregation&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Calculates essential metrics (&lt;strong&gt;Null Rate&lt;/strong&gt;, &lt;strong&gt;Mean&lt;/strong&gt;, &lt;strong&gt;Variance&lt;/strong&gt; for numerical features) over configurable *
&lt;em&gt;time windows&lt;/em&gt;* (e.g., 1-minute tumbling windows).&lt;/li&gt;
&lt;li&gt;Manages internal state efficiently for each monitored feature across active time windows.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Threshold Checker &amp;amp; Alerter:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compares the calculated statistics from each completed window against the &lt;strong&gt;user-defined thresholds&lt;/strong&gt; in the
configuration.&lt;/li&gt;
&lt;li&gt;If a threshold is breached, it generates a structured &lt;strong&gt;alert message&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;For the MVP, alerts and periodic statistics summaries are logged to &lt;strong&gt;standard output (stdout)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configuration:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loads application settings using a flexible library like &lt;code&gt;viper&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Supports loading from a &lt;strong&gt;configuration file&lt;/strong&gt; (e.g., &lt;code&gt;config.yaml&lt;/code&gt;) and/or &lt;strong&gt;environment variables&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Settings include: Kafka connection details, topic names, features to monitor, window parameters (size, type), and
alert thresholds for each metric.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🚀 Getting Started
&lt;/h2&gt;

&lt;p&gt;There are two main ways to run FeatureLens: connecting to your existing Kafka cluster or running everything locally using Docker Compose for quick testing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 1: Connecting to Your Existing Kafka
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Prerequisites:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  Go (Version 1.19+ recommended)&lt;/li&gt;
&lt;li&gt;  Git&lt;/li&gt;
&lt;li&gt;  Access to your Apache Kafka cluster.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Clone &amp;amp; Build:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/&amp;lt;your-username&amp;gt;/featurelens.git &lt;span class="c"&gt;# Replace with actual repo path&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;featurelens
go build ./cmd/featurelens
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configure:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Copy the example configuration: &lt;code&gt;cp configs/config.example.yaml config.yaml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  Edit &lt;code&gt;config.yaml&lt;/code&gt;:

&lt;ul&gt;
&lt;li&gt;  Set &lt;code&gt;kafka.brokers&lt;/code&gt; to your Kafka broker addresses (e.g., &lt;code&gt;["kafka1:9092", "kafka2:9092"]&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;  Set &lt;code&gt;kafka.topic&lt;/code&gt; to the topic you want to monitor.&lt;/li&gt;
&lt;li&gt;  Configure the &lt;code&gt;features&lt;/code&gt; section with the fields to monitor and their thresholds.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Run:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./featurelens &lt;span class="nt"&gt;-config&lt;/span&gt; config.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Option 2: Running Locally with Docker Compose (Quick Test)
&lt;/h3&gt;

&lt;p&gt;This option uses Docker Compose to quickly set up a local Kafka cluster and a web UI (AKHQ) for easy experimentation.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Prerequisites:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;  Go (Version 1.19+ recommended)&lt;/li&gt;
&lt;li&gt;  Git&lt;/li&gt;
&lt;li&gt;  Docker &amp;amp; Docker Compose&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Clone &amp;amp; Set up Environment:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/&amp;lt;your-username&amp;gt;/featurelens.git &lt;span class="c"&gt;# Replace with actual repo path&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;featurelens
docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="c"&gt;# Starts Kafka &amp;amp; AKHQ UI in background&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*   Wait a moment for services to start. AKHQ UI will be available at `http://localhost:8080`.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create Kafka Topic:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;FeatureLens needs a topic to monitor. Create it via the AKHQ UI (&lt;code&gt;http://localhost:8080&lt;/code&gt; -&amp;gt; Topics -&amp;gt; Create Topic) or using the command line:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Use the default topic name 'feature-stream' or change as needed&lt;/span&gt;
docker-compose &lt;span class="nb"&gt;exec &lt;/span&gt;kafka kafka-topics &lt;span class="nt"&gt;--create&lt;/span&gt; &lt;span class="nt"&gt;--topic&lt;/span&gt; feature-stream &lt;span class="nt"&gt;--bootstrap-server&lt;/span&gt; kafka:9093 &lt;span class="nt"&gt;--partitions&lt;/span&gt; 1 &lt;span class="nt"&gt;--replication-factor&lt;/span&gt; 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Build FeatureLens (and Optional Producer):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go build ./cmd/featurelens
go build ./cmd/producer &lt;span class="c"&gt;# Builds the sample data producer&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Run:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;(Optional) Start Sample Producer:&lt;/strong&gt; This sends sample data to the &lt;code&gt;feature-stream&lt;/code&gt; topic.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./producer
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;em&gt;(Press Ctrl+C to stop)&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Run FeatureLens:&lt;/strong&gt; Use the development config which points to local Kafka.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./featurelens &lt;span class="nt"&gt;-config&lt;/span&gt; configs/config.dev.yaml &lt;span class="c"&gt;# Ensure this config exists and points to localhost:9092&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Stop Environment:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose down
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;See &lt;code&gt;CONTRIBUTING.md&lt;/code&gt; for a more detailed development setup guide, including pre-commit hooks.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🗺️ Roadmap
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;(Future enhancements and plans beyond the MVP.)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Statistics:&lt;/strong&gt; Support for Min/Max, Median, Quantiles, Cardinality (for categorical features).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drift Detection Algorithms:&lt;/strong&gt; Implement statistical tests like Kolmogorov-Smirnov (KS test), Population Stability
Index (PSI).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Formats:&lt;/strong&gt; Support for Protobuf, Avro alongside JSON.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alerting Integrations:&lt;/strong&gt; Send alerts to Slack, PagerDuty, OpsGenie, Alertmanager.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metrics Export:&lt;/strong&gt; Expose internal metrics and calculated statistics via a Prometheus &lt;code&gt;/metrics&lt;/code&gt; endpoint for
monitoring and visualization (e.g., with Grafana).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Source Flexibility:&lt;/strong&gt; Add support for consuming from other sources like AWS Kinesis, Google Pub/Sub, or Pulsar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Management:&lt;/strong&gt; Implement more robust state management for windowing, potentially using external stores for
fault tolerance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Advanced Windowing:&lt;/strong&gt; Support for sliding windows, session windows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;(Optional) Web UI:&lt;/strong&gt; A simple interface for configuration, viewing status, and recent alerts.&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>mlops</category>
      <category>go</category>
      <category>machinelearning</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
