Skip to content

Instantly share code, notes, and snippets.

@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"
)
From d1238d4e93d7da728fe06e7d107d23d8e00aa1d2 Mon Sep 17 00:00:00 2001
From: Florian Lehner <florian.lehner@elastic.co>
Date: Wed, 11 Feb 2026 14:47:28 +0100
Subject: [PATCH] implement benchmark
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
---
pdata/pprofile/go.mod | 2 +
pdata/pprofile/go.sum | 14 +--
pdata/pprofile/pb_bench_test.go | 186 ++++++++++++++++++++++++++++++++
package main
import (
"bytes"
"fmt"
"regexp"
"strconv"
"strings"
"testing"
From 9c3af2c44583e83444bfd19a45e0beaba4f2e8e6 Mon Sep 17 00:00:00 2001
From: Florian Lehner <dev@der-flo.net>
Date: Wed, 28 Jan 2026 20:05:10 +0100
Subject: [PATCH] kallsyms: TBD
TBD
Signed-off-by: Florian Lehner <dev@der-flo.net>
---
include/linux/filter.h | 8 ++++++++