collectd

package module
v0.99.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelsFromName

func LabelsFromName(val *string) (metricName string, labels map[string]string)

LabelsFromName tries to pull out dimensions out of name in the format "name[k=v,f=x]-more_name". For the example above it would return "name-more_name" and extract dimensions (k,v) and (f,x). If something unexpected is encountered it returns the original metric name.

The code tries to avoid allocation by using local slices and avoiding calls to functions like strings.Slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL