application

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 13

Documentation

Overview

Package application provides functionality for encapsulating details about your Go application. The application details can be reported to Wavefront in the form of tags.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeartbeatService

type HeartbeatService interface {
	Close()
	AddCustomTags(tags map[string]string)
}

HeartbeatService sends a heartbeat metric every 5 minutes

func StartHeartbeatService

func StartHeartbeatService(sender senders.Sender, application Tags, source string, components ...string) HeartbeatService

StartHeartbeatService will create and start a new HeartbeatService

type Tags

type Tags struct {
	Application string
	Service     string
	Cluster     string
	Shard       string
	CustomTags  map[string]string
}

Tags Encapsulates application details

func New

func New(application, service string) Tags

New creates a new application Tags with application and service name

func (*Tags) AddCustomTagFromEnv added in v0.9.6

func (app *Tags) AddCustomTagFromEnv(varName, tag string) error

AddCustomTagFromEnv Set a custom tag from the given environment variable.

func (*Tags) AddCustomTagsFromEnv added in v0.9.6

func (app *Tags) AddCustomTagsFromEnv(regx string) error

AddCustomTagsFromEnv set additional custom tags from environment variables that match the given regex.

func (*Tags) Map

func (app *Tags) Map() map[string]string

Map with all values

Jump to

Keyboard shortcuts

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