You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

testing-metrics

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testing-metrics

This topic includes instructions on how to send custom metrics to Logz.io from your GO application.

1.0.0
latest
npm
Version published
Maintainers
1
Created
Source

This topic includes instructions on how to send custom metrics to Logz.io from your GO application.

The included example uses the OpenTelemetry GO SDK and the OpenTelemetry Cortex exporter, which are both in alpha/preview.

Quick start

Before you begin, you'll need: Node

Add instruments to your application:

Set the variables in the following code snippet:

Environment variableDescription
urlThe Logz.io Listener URL for for your region, configured to use port 8052 for http traffic, or port 8053 for https traffic.
tokenYour Logz.io Prometheus Metrics account token.
p8s_logzio_nameLabel to add to all custom metrics
Types of metric instruments

For more information, see the OpenTelemetry documentation.

NameBehaviorDefault aggregation
CounterMetric value can only go up or be reset to 0, calculated per counter.Add(context,value,labels) request.Sum
UpDownCounterMetric value can arbitrarily increment or decrement, calculated per updowncounter.Add(context,value,labels) request.Sum
ValueRecorderMetric values captured by the valuerecorder.Record(context,value,labels) function, calculated per request.TBD
SumObserverMetric value can only go up or be reset to 0, calculated per push interval.Sum
UpDownSumObserverMetric value can arbitrarily increment or decrement, calculated per push interval.Sum
ValueObserverMetric values captured by the callback function, calculated per push interval.LastValue

FAQs

Package last updated on 19 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts