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

Instrumentation and monitoring #22

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Instrumentation and monitoring #22

wants to merge 3 commits into from

Conversation

Envek
Copy link
Member

@Envek Envek commented Aug 18, 2021

Description

This PR demonstrates how to add instrumentation to Rails project with AnyCable using Yabeda and gives you local playground for monitoring.

It also includes a k6 example script to be used with xk6-cable plugin.

k6-cable.h264.mp4

How to use this example?

  1. Start application with new prometheus and grafana components

    dip up -d grafana
    dip up rails anycable
  2. Open Grafana at http://localhost:5000/ (login admin, password admin) and navigate to Dashboards → Manage.

    Or just open dashboards on direct links:

  3. Open demo application in other tabs or browsers, and look on beautiful graphs in Grafana!

Progress

  • Run Prometheus in Docker, setup metrics collection from other components (in production you will probably have it setup independently from your app)
  • Run Grafana in Docker, configure it with Prometheus and provisioned dashboards (in production you will probably have it setup independently from your app)
  • Enable AnyCable Go instrumentation
  • Instrument AnyCable RPC with yabeda-anycable gem and expose metrics with yabeda-prometheus
  • Instrument web server with yabeda-rails and yabeda-puma-plugin metrics
  • Get metrics about CPU and RAM usage (cadvisor)
  • Add dashboard for AnyCable RPC
  • Add dashboard for AnyCable Go
  • Add dashboard for Rails and Puma
  • Add dashboard for CPU and RAM
Technical implementation details

Materials used:

Debugging:

@Envek Envek added the demo Demo branch PR label Aug 18, 2021
@palkan palkan force-pushed the demo/instrumentation branch 4 times, most recently from 5cf579b to 770eced Compare September 6, 2021 12:32
@palkan palkan mentioned this pull request Oct 25, 2021
5 tasks
Envek and others added 2 commits August 29, 2022 17:33
(cherry picked from commit d423833)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demo Demo branch PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants