Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@dialpad/telemetry-js
Advanced tools
An open telemetry library to export metrics and traces
JS opentelemetry library for Dialpad applications. This library can be used to send metrics data to a collector.
options = {
"url" : "<metrics collector endpoint>",
"authToken" : "<API key for authorization>";
}
// This is an optional parameter. These labels will be set to all instruments.
labels = { key : value }.
true - initialized
false - Not initialized
// These labels will be set to all instruments.
labels = { key : value }
None
name = "<name of the instrument>"
val = integer value to increment
// This is an optional parameter. These labels will be appended to application level labels.
labels = { key : value }
name = "<name of the instrument>"
val = integer value to increment
// This is an optional parameter. These labels will be appended to application level labels.
labels = { key : value }
unit = "string value to indicate unit. eg: 'ms'"
import { Otel as otel } from '@dialpad/telemetry-js';
otel.init({
url: config.otelUrl,
authToken: config.otelAuthToken
});
otel.record({
name: 'outbound_call.ui.prepare_to_dial',
val: 20,
labels: {},
unit: 'ms',
});
Custom exporter class is used to override the metrics payload. This is required to support the latest version of metrics payload as optelemetry-js is not compatible with latest version.
TODO: Remove this custom exporter when opentelemetry-js support latest data model.
This class is used to change the behavior of the processor class so we do not send duplicate metrics after certain attempt.
TODO: Figure out a way to clear the record from otel library which will help us to reduce the memory footprint. There is a lot of work going on currently with the otel metrics module and need to revisit this later.
FAQs
An open telemetry library to export metrics and traces
The npm package @dialpad/telemetry-js receives a total of 0 weekly downloads. As such, @dialpad/telemetry-js popularity was classified as not popular.
We found that @dialpad/telemetry-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 17 open source maintainers collaborating on the project.
Did you know?
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.