types

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tag

type Tag struct {
	Name  string      `json:"name"`
	Value interface{} `json:"value"`
}

Tag represents a single key-value pair used to add dimensions to a metric.

func (*Tag) ToAttribute

func (t *Tag) ToAttribute() attribute.KeyValue

ToAttribute converts a single Tag to an OpenTelemetry KeyValue attribute, automatically detecting the value type.

type Tags

type Tags []Tag

Tags is a slice of Tag objects.

func (*Tags) ToAttributes

func (t *Tags) ToAttributes() []attribute.KeyValue

ToAttributes converts a slice of Tags to an array of OpenTelemetry KeyValue attributes.

func (*Tags) ToStringArray

func (tags *Tags) ToStringArray() []string

ToStringArray converts a slice of Tags into a string array formatted for Datadog ("key:value").

Jump to

Keyboard shortcuts

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