MCPcopy Index your code
hub / github.com/cloudflare/ebpf_exporter / DecodeLabelsForTracing

Method DecodeLabelsForTracing

decoder/decoder.go:140–145  ·  view source on GitHub ↗

DecodeLabelsForTracing transforms eBPF map key bytes into a list of label values according to configuration (different label sets require different names). This decoder method variant does not do caching and is suitable for tracing.

(in []byte, labels []config.Label)

Source from the content-addressed store, hash-verified

138// according to configuration (different label sets require different names).
139// This decoder method variant does not do caching and is suitable for tracing.
140func (s *Set) DecodeLabelsForTracing(in []byte, labels []config.Label) ([]string, error) {
141 s.mu.Lock()
142 defer s.mu.Unlock()
143
144 return s.decodeLabels(in, labels)
145}
146
147// decodeLabels is the inner function of DecodeLabels without any caching
148func (s *Set) decodeLabels(in []byte, labels []config.Label) ([]string, error) {

Callers 2

extractLabelsFunction · 0.80

Calls 1

decodeLabelsMethod · 0.95

Tested by 1