Code Monkey home page Code Monkey logo

go-spew's Introduction

Go Spew

This is a dumb container that randomly generates and emits structured log messages on a regular interval for monitoring a log pipeline. This is also useful for watermarking in kafka topics.

Watermark is a moving threshold in event-time that trails behind the maximum event-time seen by the query in the processed data. The trailing gap defines how long we will wait for late data to arrive. By knowing the point at which no more data will arrive for a given group, we can limit the total amount of state that we need to maintain for a query. For example, suppose the configured maximum lateness is 10 minutes. That means the events that are up to 10 minutes late will be allowed to aggregate. And if the maximum observed event time is 12:33, then all the future events with event-time older than 12:23 will be considered as "too late" and dropped.

Because the messages are written to disk with a timestamp, and there's another timestamp from when the message is consumed, while allowing for clock skew, this will give good insight into the latency of the log pipeline.

Similarly, if messages fail to show up in a reasonable window, this can indicate a failure of the log pipeline.

How to run it in kubernetes

kubectl apply -f k8s/go-spew.yaml

You can adjust the INTERVAL environment variable (default to 30 seconds) for how frequently.

How to run it locally

docker-compose up

How to stop it locally

image_name=stevenacoffman/go_spew
docker stop "$(docker ps --format '{{.ID}}' --filter "ancestor=${image_name}")"

go-spew's People

Contributors

stevenacoffman avatar

Stargazers

Steve Sperandeo avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.