You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@opentelemetry/resources

Package Overview
Dependencies
Maintainers
5
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/resources

OpenTelemetry SDK resources


Version published
Weekly downloads
8M
decreased by-0.91%
Maintainers
5
Install size
1.31 MB
Created
Weekly downloads
 

Package description

What is @opentelemetry/resources?

The @opentelemetry/resources package is part of the OpenTelemetry project, which provides a set of APIs, libraries, agents, and instrumentation to create and manage telemetry data (metrics, logs, and traces) for cloud-native software. This package specifically offers a way to describe the entity producing telemetry, such as service, environment, and versioning information. It allows users to define and attach these details to their telemetry data.

What are @opentelemetry/resources's main functionalities?

Creating a Resource

This feature allows the creation of a Resource object that describes the service generating telemetry data. It includes attributes like service name, version, and deployment environment.

{"const { Resource } = require('@opentelemetry/resources');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');

const resource = new Resource({
  [SemanticResourceAttributes.SERVICE_NAME]: 'my-service',
  [SemanticResourceAttributes.SERVICE_VERSION]: '1.0.0',
  [SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT]: 'production'
});
"}

Merging Resources

This feature demonstrates how to merge two Resource objects into one, combining their attributes. This is useful when you have resource information coming from different sources and want to create a unified view.

{"const { Resource } = require('@opentelemetry/resources');

const resource1 = new Resource({
  'service.name': 'my-service'
});
const resource2 = new Resource({
  'service.version': '1.0.0'
});

const mergedResource = resource1.merge(resource2);
"}

Other packages similar to @opentelemetry/resources

Changelog

Source

0.7.0

Released 2020-04-23

:boom: Breaking Change

  • opentelemetry-exporter-collector
    • #901 grpc for node and support for new proto format for node and browser (@obecny)
  • opentelemetry-api, opentelemetry-metrics
    • #964 chore: adding metric observable to be able to support async update (@obecny)

:bug: (Bug Fix)

:rocket: (Enhancement)

  • opentelemetry-resources
  • opentelemetry-metrics

Committers: 5

Keywords

FAQs

Package last updated on 24 Apr 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc