Socket
Socket
Sign inDemoInstall

@opentelemetry/semantic-conventions

Package Overview
Dependencies
0
Maintainers
4
Versions
106
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @opentelemetry/semantic-conventions

OpenTelemetry semantic conventions


Version published
Maintainers
4
Install size
391 kB
Created

Package description

What is @opentelemetry/semantic-conventions?

The @opentelemetry/semantic-conventions package provides standardized naming and semantic conventions for attributes in OpenTelemetry. These conventions help ensure that telemetry data is consistent, interpretable, and analyzable across different systems and services. The package includes constants for resource attributes, span attributes, and event names that are recommended by the OpenTelemetry specification.

What are @opentelemetry/semantic-conventions's main functionalities?

Resource Attributes

Defines standard attributes to be used for service resources, allowing you to annotate your telemetry data with information about the service instance.

{"service.name": 'my-service', "service.version": '1.0.0', "service.instance.id": 'instance-123'}

Span Attributes

Provides a set of standard attributes for spans, which represent individual operations within a trace. These attributes can be used to add metadata about the operation, such as HTTP method, URL, and status code.

{"http.method": 'GET', "http.url": 'https://example.com', "http.status_code": 200}

Event Names

Includes standardized event names for logging exceptions, messages, and metrics within spans. This helps in categorizing and querying telemetry events.

"exception", "message", "metric"

Other packages similar to @opentelemetry/semantic-conventions

Changelog

Source

1.0.1 / Experimental 0.27.0

:boom: Breaking Change

  • Other
    • #2566 feat!(metrics): remove batch observer (@dyladan)
    • #2485 feat!: Split metric and trace exporters into new experimental packages (@willarmiros)
    • #2540 fix(sdk-metrics-base): remove metric kind BATCH_OBSERVER (@legendecas)
    • #2496 feat(api-metrics): rename metric instruments to match feature-freeze API specification (@legendecas)
  • opentelemetry-core

:rocket: (Enhancement)

  • Other
    • #2523 feat: Rename Labels to Attributes (@pirgeo)
    • #2559 feat(api-metrics): remove bind/unbind and bound instruments (@legendecas)
    • #2563 feat(sdk-metrics-base): remove per-meter config on MeterProvider.getMeter (@legendecas)
  • opentelemetry-core
    • #2465 fix: prefer globalThis instead of window to support webworkers (@legendecas)
  • opentelemetry-semantic-conventions
    • #2532 feat(@opentelemetry/semantic-conventions): change enum to object literals (@echoontheway)
    • #2528 feat: upgrade semantic-conventions to latest v1.7.0 spec (@weyert)
  • opentelemetry-core, opentelemetry-sdk-trace-base

:bug: (Bug Fix)

  • Other
    • #2610 fix: preventing double enable for instrumentation that has been already enabled (@obecny)
    • #2581 feat: lazy initialization of the gzip stream (@fungiboletus)
    • #2584 fix: fixing compatibility versions for detectors (@obecny)
    • #2558 fix(@opentelemetry/exporter-prometheus): unref prometheus server to prevent process running indefinitely (@mothershipper)
    • #2495 fix(sdk-metrics-base): metrics name should be in the max length of 63 (@legendecas)
    • #2497 feat(@opentelemetry-instrumentation-fetch): support reading response body from the hook applyCustomAttributesOnSpan (@echoontheway)
  • opentelemetry-core
    • #2560 fix(core): support regex global flag in urlMatches (@moander)
  • opentelemetry-exporter-zipkin
    • #2519 fix(exporter-zipkin): correct status tags names (@t2t2)

:books: (Refine Doc)

:house: (Internal)

  • Other
  • opentelemetry-sdk-trace-base, opentelemetry-sdk-trace-node, opentelemetry-sdk-trace-web
  • opentelemetry-context-async-hooks, opentelemetry-context-zone-peer-dep, opentelemetry-core, opentelemetry-exporter-jaeger, opentelemetry-exporter-zipkin, opentelemetry-propagator-b3, opentelemetry-propagator-jaeger, opentelemetry-resources, opentelemetry-sdk-trace-base, opentelemetry-sdk-trace-node, opentelemetry-sdk-trace-web, opentelemetry-shim-opentracing
  • opentelemetry-core

Committers: 23

Readme

Source

OpenTelemetry Semantic Conventions

NPM Published Version dependencies devDependencies Apache License

Semantic Convention constants for use with the OpenTelemetry SDK/APIs. This document defines standard attributes for traces.

Installation

npm install --save @opentelemetry/semantic-conventions

Usage

import { SemanticAttributes } from '@opentelemetry/semantic-conventions';

const span = tracer.startSpan().startSpan(spanName, spanOptions)
  .setAttributes({
    [SemanticAttributes.NET_PEER_NAME]: 'localhost',
  });

License

Apache 2.0 - See LICENSE for more information.

Keywords

FAQs

Last updated on 11 Nov 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc