tracermetadata

package
v0.0.0-...-944de92 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package tracermetadata parses the tracer-generated metadata

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTracerMemfdPath

func IsTracerMemfdPath(linkTarget string) bool

IsTracerMemfdPath checks if the given readlink path is a tracer memfd file. The linkTarget should be the result of reading a symlink from /proc/PID/fd/.

func ShouldSkipServiceTag

func ShouldSkipServiceTag(tag string, ustService, ustEnv, ustVersion string) bool

ShouldSkipServiceTag checks if a tracer service tag should be skipped if it matches the UST tags.

func ShouldSkipServiceTagKV

func ShouldSkipServiceTagKV(tagKey, tagValue, ustService, ustEnv, ustVersion string) bool

ShouldSkipServiceTagKV checks if a tracer service tag key-value pair should be skipped if it matches the UST tags.

Types

type TracerMetadata

type TracerMetadata struct {
	SchemaVersion  uint8  `json:"schema_version"`
	RuntimeID      string `json:"runtime_id,omitempty"`
	TracerLanguage string `json:"tracer_language"`
	TracerVersion  string `json:"tracer_version"`
	Hostname       string `json:"hostname"`
	ServiceName    string `json:"service_name,omitempty"`
	ServiceEnv     string `json:"service_env,omitempty"`
	ServiceVersion string `json:"service_version,omitempty"`
	ProcessTags    string `json:"process_tags,omitempty"`
	ContainerID    string `json:"container_id,omitempty"`
	LogsCollected  bool   `json:"logs_collected,omitempty"`
}

TracerMetadata as defined in https://github.com/DataDog/libdatadog/blob/0b59f64c4fc08105e5b73c5a0752ced3cf8f653e/datadog-library-config/src/tracer_metadata.rs#L7-L34

func GetTracerMetadata

func GetTracerMetadata(pid int, procRoot string) (TracerMetadata, error)

GetTracerMetadata parses the tracer-generated metadata according to https://docs.google.com/document/d/1kcW6BLdYxXeTSUz31cBqoqfW1Jjs0IDljfKeUfIRQp4/

func GetTracerMetadataFromPath

func GetTracerMetadataFromPath(fdPath string) (TracerMetadata, error)

GetTracerMetadataFromPath reads and parses tracer metadata from a known fd path. The fdPath should be the full path to the fd (e.g., /proc/1234/fd/5).

func (*TracerMetadata) DecodeMsg

func (z *TracerMetadata) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*TracerMetadata) EncodeMsg

func (z *TracerMetadata) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (TracerMetadata) GetTags

func (t TracerMetadata) GetTags() []string

GetTags returns a list of tags from the tracer metadata

func (*TracerMetadata) MarshalMsg

func (z *TracerMetadata) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*TracerMetadata) Msgsize

func (z *TracerMetadata) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (TracerMetadata) Tags

func (t TracerMetadata) Tags() iter.Seq2[string, string]

Tags returns a sequence of tags from the tracer metadata

func (*TracerMetadata) UnmarshalMsg

func (z *TracerMetadata) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Directories

Path Synopsis
Package language bridges the tracer metadata and the language detection package.
Package language bridges the tracer metadata and the language detection package.

Jump to

Keyboard shortcuts

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