Skip to content

Instantly share code, notes, and snippets.

View stefanoverna's full-sized avatar

Stefano Verna stefanoverna

View GitHub Profile

Unlocking Performance Insights: A Guide to Grafana Profiles Drilldown with Rails on EKS

To enable Grafana Profiles Drilldown for your Rails application running in EKS, you'll need to introduce a continuous profiling backend to your existing stack. The key takeaway is that Grafana's Profiles Drilldown feature is powered by Grafana Pyroscope, not Loki. While your current setup with the OpenTelemetry Collector and Loki is excellent for logs, it needs to be extended to handle profiling data.

This guide will walk you through the necessary additions and modifications to your Terraform configuration to integrate Pyroscope and instrument your Rails application for profiling.

The Interconnected Pieces: How It All Works

Here's a high-level overview of how the components will work together to provide you with profiling data in Grafana:

@stefanoverna
stefanoverna / README.md
Created April 30, 2025 12:26
Load testing

Ciao!

{
"id": 0,
"name": "datocms-plugin-sdk",
"variant": "project",
"kind": 1,
"flags": {},
"children": [
{
"id": 1,
"name": "Account",
{
"id": 0,
"name": "datocms-react-ui",
"variant": "project",
"kind": 1,
"flags": {},
"children": [
{
"id": 137,
"name": "FieldGroupProps",
import type { RenderFieldExtensionCtx } from "datocms-plugin-sdk";
import { Canvas } from "datocms-react-ui";
import { useEffect, useState } from "react";
type Props = {
ctx: RenderFieldExtensionCtx;
};
export default function Editor({ ctx }: Props) {
const key = JSON.stringify([ctx.item?.id, ctx.fieldPath]);
{
"id": 0,
"name": "datocms-react-ui",
"variant": "project",
"kind": 1,
"flags": {},
"children": [
{
"id": 135,
"name": "FieldGroupProps",
{
"id": 0,
"name": "datocms-plugin-sdk",
"variant": "project",
"kind": 1,
"flags": {},
"children": [
{
"id": 1,
"name": "Account",
import { buildClient } from "@datocms/cma-client-node";
import fetch from "cross-fetch";
const client = buildClient({
apiToken: process.env.READWRITE_DATOCMS_API_TOKEN,
fetchFn: fetch,
});
async function run() {
for await (const delivery of client.webhookCalls.listPagedIterator({
@stefanoverna
stefanoverna / index.tsx
Created March 28, 2023 09:27
Example of usage of new hooks
import { connect } from 'datocms-plugin-sdk';
connect({
buildItemPresentationInfo(item, ctx) {
// we only want to customize the presentation for records of a specific
// model
if (item.relationships.item_type.data.id !== '810975') {
return undefined;
}
#include <stdio.h>
#include <string.h>
struct KeyPoint
{
char key;
char points;
};
struct KeyPoint rules[] = {