Skip to content

Instantly share code, notes, and snippets.

@florianl
florianl / 0001-coredump-add-migrate-subcommand.patch
Created October 3, 2026 17:30
0001-coredump-add-migrate-subcommand.patch
From bf57a123d0fdf5cbadbcc1bb78bf6772552a462b Mon Sep 17 00:00:00 2001
From: Florian Lehner <dev@der-flo.net>
Date: Fri, 2 Oct 2026 22:20:57 +0200
Subject: [PATCH] coredump: add migrate subcommand
Signed-off-by: Florian Lehner <dev@der-flo.net>
---
libpf/pfelf/file.go | 8 +
nativeunwind/elfunwindinfo/elfgopclntab.go | 2 +-
tools/coredump/coredump_test.go | 23 +-
driver {
name = aquastreamv2
meter_type = WaterMeter
default_fields = name,id,total_m3,timestamp
detect {
mvt = IMT,f2,07
}
library {
use = total_m3,meter_datetime,target_m3,target_date,flow_temperature_c
}
From ab7edf02c112137475616b62b7d67d46a4c75f76 Mon Sep 17 00:00:00 2001
From: Florian Lehner <dev@der-flo.net>
Date: Mon, 7 Sep 2026 14:57:28 +0200
Subject: [PATCH] Fix ARM64 cross-compilation for kernels 5.10 and 5.15
Resolves cross-compilation failures when building kernels 5.10.268 and
5.15.219 for ARM64 architecture using docker buildx from amd64.
Signed-off-by: Florian Lehner <dev@der-flo.net>
---
@florianl
florianl / pr1806.diff
Created September 1, 2026 14:48
pr1806.diff
diff --git a/collector/internal/controller.go b/collector/internal/controller.go
index 4f66379e..e1a4335f 100644
--- a/collector/internal/controller.go
+++ b/collector/internal/controller.go
@@ -39,7 +39,7 @@ type Controller struct {
onShutdown func() error
errorMode config.ErrorMode
extensionIDs []component.ID
- probes map[component.ID]tracer.Probe
+ probes []tracer.Probe
@florianl
florianl / processmetadata-research.md
Last active August 20, 2026 14:47
Current state and outlook for Process Metadata handling

Process Metadata: Current Landscape and Unified Enricher API

Meta

  • Related PRs: #1500, #1630, #1343, #1703, #1716, #1739, #1767, #1768, #1770, #1771

Abstract

The profiler needs to attach per-process metadata — container ID, env vars, OTel service name,

@florianl
florianl / weaver-live-check.sh
Created August 14, 2026 13:43
weaver live test script
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROFILER="${SCRIPT_DIR}/otelcol-ebpf-profiler"
STATE_DIR=/tmp/weaver-live-check
OTLP_PORT=4317
ADMIN_PORT=4320
COLLECT_SECONDS=${COLLECT_SECONDS:-65}
REGISTRY='https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v1.41.1.tar.gz[model]'
@florianl
florianl / gist:7e8a49c2a32a937ed8fad2ac9ef85c25
Created August 14, 2026 07:05
weaver profiles example output
{
"samples": [
{
"resource": {
"attributes": [
{
"name": "process.pid",
"value": 1561,
"type": "int",
"live_check_result": {
@florianl
florianl / pr-1429.patch
Created July 9, 2026 07:44
Extend option to collector receiver
diff --git a/collector/config/config.go b/collector/config/config.go
index 9dfc35a7..eb9730bc 100644
--- a/collector/config/config.go
+++ b/collector/config/config.go
@@ -70,6 +70,11 @@ type Config struct {
ErrorMode ErrorMode `mapstructure:"error_mode"`
OBIProcessCtx bool `mapstructure:"obi_process_ctx"`
TargetCPUIDs string `mapstructure:"target_cpu_ids"`
+
+ // Configuration options that users can not set directly:
+// TestConnSendConcurrentWithReceive verifies that Send can proceed while
+// Receive is blocked, as required by patterns like NFQUEUE.
+func TestConnSendConcurrentWithReceive(t *testing.T) {
+ t.Parallel()
+
+ sock := &blockingSocket{
+ receivingC: make(chan struct{}),
+ doneC: make(chan struct{}),
+ }
+
@florianl
florianl / bench_test.go
Last active April 27, 2026 06:09
compare fmt.Sprint with strings.Join
package main
import (
"cmp"
"fmt"
"slices"
"strings"
"testing"
)