JSPM

@opentelemetry/resources

0.24.1-alpha.1+3b9cd16a
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20357804
  • Score
    100M100P100Q230746F
  • License Apache-2.0

OpenTelemetry SDK resources

Package Exports

  • @opentelemetry/resources
  • @opentelemetry/resources/build/esm/platform/browser/index.js
  • @opentelemetry/resources/build/esm/platform/index.js
  • @opentelemetry/resources/build/src/platform/browser/index.js
  • @opentelemetry/resources/build/src/platform/index.js
  • @opentelemetry/resources/build/src/platform/node/detect-resources

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@opentelemetry/resources) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

OpenTelemetry Resources Util

NPM Published Version dependencies devDependencies Apache License

The OpenTelemetry Resource is an immutable representation of the entity producing telemetry. For example, a process producing telemetry that is running in a container on Kubernetes has a Pod name, it is in a namespace and possibly is part of a Deployment which also has a name. All three of these attributes can be included in the Resource.

This document defines standard attributes for resources which are accessible via @opentelemetry/semantic-conventions.

Installation

npm install --save @opentelemetry/resources

Usage

import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '@opentelemetry/resources';

const resource = new Resource({
    [SemanticResourceAttributes.SERVICE_NAME]: 'api-service',
});

const another_resource = new Resource({
    'service.version': 2.0.0,
    'service.group': 'instrumentation-group'
});
const merged_resource = resource.merge(another_resource);

License

Apache 2.0 - See LICENSE for more information.