telemetry

package
v0.0.0-...-4b288b9 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildInboundStatPrefix

func BuildInboundStatPrefix(statPattern string, tm FilterChainMetadata, subset string, port uint32, portName string) string

BuildInboundStatPrefix builds a stat prefix based on the stat pattern and filter chain telemetry data.

func BuildStatPrefix

func BuildStatPrefix(statPattern string, host string, subset string, port *model.Port, targetPort int, attributes *model.ServiceAttributes) string

BuildStatPrefix builds a stat prefix based on the stat pattern.

func TraceOperation

func TraceOperation(host string, port int) string

TraceOperation builds the string format: "%s:%d/*" for a given host and port

Types

type FilterChainMetadata

type FilterChainMetadata struct {
	// InstanceHostname defines the hostname of the service this filter chain is built for.
	// Note: This is best effort; this may be empty if generated by Sidecar config, and there may be multiple
	// Services that make up the filter chain.
	InstanceHostname host.Name
	// KubernetesServiceNamespace is the namespace the service is defined in, if it is for a Kubernetes Service.
	// Note: This is best effort; this may be empty if generated by Sidecar config, and there may be multiple
	// Services that make up the filter chain.
	KubernetesServiceNamespace string
	// KubernetesServiceName is the name of service, if it is for a Kubernetes Service.
	// Note: This is best effort; this may be empty if generated by Sidecar config, and there may be multiple
	// Services that make up the filter chain.
	KubernetesServiceName string
}

FilterChainMetadata defines additional metadata for telemetry use for a filter chain.

func (FilterChainMetadata) ServiceName

func (tm FilterChainMetadata) ServiceName() string

ServiceName constructs the service name from kubernetes service name if available or just uses instance host name.

func (FilterChainMetadata) ShortHostname

func (tm FilterChainMetadata) ShortHostname() string

ShortHostname constructs the short hostname from kubernetes service name if available or just uses instance hostname.

Jump to

Keyboard shortcuts

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