metrics_sender

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	SAMPLE_QUEUE_CAPACITY = 10 // Number of sample batches we'll wait for, min 2 * high freq samplers + 1 * low freq samples
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

Sender is responsible for submitting data to the collector endpoint.

func NewSender

func NewSender(ctx agent.AgentContext) *Sender

func (*Sender) RegisterSampler

func (s *Sender) RegisterSampler(sampler sampler.Sampler)

func (*Sender) Start

func (s *Sender) Start() (err error)

Start will register the sender with the collector, then start a couple of background routines to handle incoming data and post it to the server periodically.

func (*Sender) Stop

func (s *Sender) Stop() (err error)

Stop will gracefully shut down all sending processes and reset the state of the sender. After Stop() returns, it is safe to call Start() again on the same sender instance.

Jump to

Keyboard shortcuts

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