Socket
Socket
Sign inDemoInstall

@opentelemetry/semantic-conventions

Package Overview
Dependencies
0
Maintainers
3
Versions
104
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
3
Install size
1.58 MB
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.22.0

:rocket: (Enhancement)

  • feat(sdk-metrics): allow single bucket histograms #4456 @pichlermarc
  • feat(instrumentation): Make init() method public #4418
  • feat(context-zone-peer-dep, context-zone): support zone.js 0.13.x, 0.14.x #4469 @pichlermarc
  • chore: Semantic Conventions export individual strings 4185

:bug: (Bug Fix)

  • fix(sdk-metrics): handle zero bucket counts in exponential histogram merge #4459 @mwear
  • fix(sdk-metrics): ignore NaN value recordings in Histograms #4455 @pichlermarc
    • fixes a bug where recording NaN on a histogram would result in the sum of bucket count values not matching the overall count
  • fix(sdk-metrics): allow single bucket histograms #4456 @pichlermarc
    • fixes a bug where Meter.createHistogram() with the advice explicitBucketBoundaries: [] would throw
  • fix(context-zone-peer-dep, context-zone): support zone.js 0.13.x, 0.14.x #4469 @pichlermarc

:books: (Refine Doc)

  • docs: shorten readme sections #4460 @legendecas

Readme

Source

OpenTelemetry Semantic Conventions

NPM Published Version 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 29 Feb 2024

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc