Home / Companies / Grafana Labs / Blog / Post Details
Content Deep Dive

From raw data to flame graphs: A deep dive into how the OpenTelemetry eBPF profiler symbolizes Go

Blog post from Grafana Labs

Post Details
Company
Date Published
Author
Marc Sanmiquel
Word Count
3,082
Language
English
Hacker News Points
-
Summary

In a detailed exploration of the OpenTelemetry eBPF profiler's capabilities, the article delves into the complexities of symbolization, a crucial process for mapping memory addresses to function names in Go programs. When troubleshooting performance issues, profilers like OpenTelemetry capture raw memory addresses which are then translated into meaningful function names through a process involving the Go-specific .gopclntab section. This section, integral to the Go runtime for stack traces and reflection, remains even in stripped binaries and provides a significant advantage for profiling Go applications over other languages. The article explains how the profiler utilizes this section to efficiently resolve addresses to function names with minimal CPU overhead, thereby enabling effective continuous profiling. It highlights the challenges eBPF profilers face, such as operating in kernel space without modifying user processes, and showcases the performance optimizations like binary search and frame caching that make symbolization feasible in production environments. The discussion underscores Go's unique suitability for eBPF profiling due to its embedded symbol information, which remains intact even when binaries are stripped, facilitating full observability without compromising binary size or performance.