acceptor

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package acceptor provides marshaling structs for Instana serverless acceptor API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSContainerLimits

type AWSContainerLimits struct {
	CPU    int `json:"cpu"`
	Memory int `json:"memory"`
}

AWSContainerLimits is used to send container limits (CPU, memory) to the acceptor plugin

type DockerData

type DockerData struct {
	ID               string              `json:"Id"`
	Command          string              `json:"Command"`
	CreatedAt        time.Time           `json:"Created"`
	StartedAt        time.Time           `json:"Started"`
	Image            string              `json:"Image"`
	Labels           aws.ContainerLabels `json:"Labels,omitempty"`
	Ports            string              `json:"Ports,omitempty"`
	PortBindings     string              `json:"PortBindings,omitempty"`
	Names            []string            `json:"Names,omitempty"`
	NetworkMode      string              `json:"NetworkMode,omitempty"`
	StorageDriver    string              `json:"StorageDriver,omitempty"`
	DockerVersion    string              `json:"docker_version,omitempty"`
	DockerAPIVersion string              `json:"docker_api_version,omitempty"`
	Memory           int                 `json:"Memory"`
}

DockerData is a representation of a Docker container for com.instana.plugin.docker plugin

type ECSContainerData

type ECSContainerData struct {
	Runtime               string             `json:"runtime"`
	Instrumented          bool               `json:"instrumented,omitempty"`
	DockerID              string             `json:"dockerId"`
	DockerName            string             `json:"dockerName"`
	ContainerName         string             `json:"containerName"`
	Image                 string             `json:"image"`
	ImageID               string             `json:"imageId"`
	TaskARN               string             `json:"taskArn"`
	TaskDefinition        string             `json:"taskDefinition"`
	TaskDefinitionVersion string             `json:"taskDefinitionVersion"`
	ClusterARN            string             `json:"clusterArn"`
	DesiredStatus         string             `json:"desiredStatus"`
	KnownStatus           string             `json:"knownStatus"`
	Limits                AWSContainerLimits `json:"limits"`
	CreatedAt             time.Time          `json:"createdAt"`
	StartedAt             time.Time          `json:"startedAt"`
	Type                  string             `json:"type"`
}

ECSContainerData is a representation of an ECS container for com.instana.plugin.aws.ecs.container plugin

type ECSTaskData

type ECSTaskData struct {
	TaskARN               string             `json:"taskArn"`
	ClusterARN            string             `json:"clusterArn"`
	AvailabilityZone      string             `json:"availabilityZone,omitempty"`
	TaskDefinition        string             `json:"taskDefinition"`
	TaskDefinitionVersion string             `json:"taskDefinitionVersion"`
	DesiredStatus         string             `json:"desiredStatus"`
	KnownStatus           string             `json:"knownStatus"`
	Limits                AWSContainerLimits `json:"limits"`
	PullStartedAt         time.Time          `json:"pullStartedAt"`
	PullStoppedAt         time.Time          `json:"pullStoppedAt"`
}

ECSTaskData is a representation of an ECS task for com.instana.plugin.aws.ecs.task plugin

type GoProcessData

type GoProcessData struct {
	PID      int          `json:"pid"`
	Snapshot *RuntimeInfo `json:"snapshot,omitempty"`
	Metrics  Metrics      `json:"metrics"`
}

GoProcessData is a representation of a Go process for com.instana.plugin.golang plugin

type MemoryStats

type MemoryStats struct {
	Alloc         uint64  `json:"alloc"`
	TotalAlloc    uint64  `json:"total_alloc"`
	Sys           uint64  `json:"sys"`
	Lookups       uint64  `json:"lookups"`
	Mallocs       uint64  `json:"mallocs"`
	Frees         uint64  `json:"frees"`
	HeapAlloc     uint64  `json:"heap_alloc"`
	HeapSys       uint64  `json:"heap_sys"`
	HeapIdle      uint64  `json:"heap_idle"`
	HeapInuse     uint64  `json:"heap_in_use"`
	HeapReleased  uint64  `json:"heap_released"`
	HeapObjects   uint64  `json:"heap_objects"`
	PauseTotalNs  uint64  `json:"pause_total_ns"`
	PauseNs       uint64  `json:"pause_ns"`
	NumGC         uint32  `json:"num_gc"`
	GCCPUFraction float64 `json:"gc_cpu_fraction"`
}

MemoryStats represents Go runtime memory stats to be sent to com.insana.plugin.golang

type Metrics

type Metrics struct {
	CgoCall     int64 `json:"cgo_call"`
	Goroutine   int   `json:"goroutine"`
	MemoryStats `json:"memory"`
}

Metrics represents Go process metrics to be sent to com.insana.plugin.golang

type PluginPayload

type PluginPayload struct {
	Name     string      `json:"name"`
	EntityID string      `json:"entityId"`
	Data     interface{} `json:"data"`
}

PluginPayload represents the Instana acceptor message envelope containing plugin name and entity ID

func NewDockerPluginPayload

func NewDockerPluginPayload(entityID string, data DockerData) PluginPayload

NewDockerPluginPayload returns payload for the Docker plugin of Instana acceptor

func NewECSContainerPluginPayload

func NewECSContainerPluginPayload(entityID string, data ECSContainerData) PluginPayload

NewECSContainerPluginPayload returns payload for the ECS container plugin of Instana acceptor

func NewECSTaskPluginPayload

func NewECSTaskPluginPayload(entityID string, data ECSTaskData) PluginPayload

NewECSTaskPluginPayload returns payload for the ECS task plugin of Instana acceptor

func NewGoProcessPluginPayload

func NewGoProcessPluginPayload(data GoProcessData) PluginPayload

NewGoProcessPluginPayload returns payload for the Go process plugin of Instana acceptor

func NewProcessPluginPayload

func NewProcessPluginPayload(entityID string, data ProcessData) PluginPayload

NewProcessPluginPayload returns payload for the process plugin of Instana acceptor

type ProcessData

type ProcessData struct {
	PID           int               `json:"pid"`
	Exec          string            `json:"exec"`
	Args          []string          `json:"args,omitempty"`
	Env           map[string]string `json:"env,omitempty"`
	User          string            `json:"user,omitempty"`
	Group         string            `json:"group,omitempty"`
	ContainerID   string            `json:"container,omitempty"`
	ContainerPid  int               `json:"containerPid,string,omitempty"`
	ContainerType string            `json:"containerType,omitempty"`
	Start         int64             `json:"start"`
	HostName      string            `json:"com.instana.plugin.host.name"`
	HostPID       int               `json:"com.instana.plugin.host.pid,string"`
}

ProcessData is a representation of a running process for com.instana.plugin.process plugin

type RuntimeInfo

type RuntimeInfo struct {
	Name     string `json:"name"`
	Version  string `json:"version"`
	Root     string `json:"goroot"`
	MaxProcs int    `json:"maxprocs"`
	Compiler string `json:"compiler"`
	NumCPU   int    `json:"cpu"`
}

RuntimeInfo represents Go runtime info to be sent to com.insana.plugin.golang

Jump to

Keyboard shortcuts

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