Socket
Socket
Sign inDemoInstall

@opentelemetry/semantic-conventions

Package Overview
Dependencies
0
Maintainers
4
Versions
105
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @opentelemetry/semantic-conventions

OpenTelemetry semantic conventions


Version published
Weekly downloads
15M
increased by3.14%
Maintainers
4
Install size
342 kB
Created
Weekly downloads
 

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

0.24.0

:boom: Breaking Change

  • opentelemetry-core, opentelemetry-exporter-jaeger, opentelemetry-exporter-zipkin, opentelemetry-node, opentelemetry-resource-detector-aws, opentelemetry-resource-detector-gcp, opentelemetry-resources, opentelemetry-semantic-conventions, opentelemetry-web
    • #2345 feat: updated spec to v1.5.0 and renamed resource class (@weyert)

:rocket: (Enhancement)

  • opentelemetry-exporter-collector-proto, opentelemetry-exporter-collector
  • opentelemetry-instrumentation-http
    • #2332 feat(@opentelemetry-instrumentation-http): support adding custom attributes before a span is started (@echoontheway)
    • #2349 fix(instrumentation-http): set outgoing request attributes on start span (@blumamir)
  • opentelemetry-web
    • #2343 feat(opentelemetry-web): capture decodedBodySize / http.response_content_length_uncompressed (@t2t2)
  • opentelemetry-instrumentation
    • #2309 chore: add includePrerelease option to instrumentation config (@dyladan)

:bug: (Bug Fix)

  • opentelemetry-exporter-collector
  • opentelemetry-exporter-collector-grpc
    • #2322 fix(@opentelemetry/exporter-collector-grpc) regression from #2130 when host specified without protocol (@lizthegrey)
  • opentelemetry-exporter-collector-proto

:books: (Refine Doc)

  • Other
  • opentelemetry-resource-detector-aws
  • opentelemetry-propagator-b3
  • opentelemetry-exporter-collector-grpc
    • #2266 fix(exporter-collector-grpc): incorrect URL format on docs after 0.20.0 update (@brunoluiz)

:house: (Internal)

  • Other
  • opentelemetry-exporter-collector-grpc, opentelemetry-exporter-jaeger, opentelemetry-instrumentation, opentelemetry-node, opentelemetry-sdk-node, opentelemetry-shim-opentracing, opentelemetry-tracing, opentelemetry-web
    • #2351 style: use single quotes everywhere and add a rule to eslint (@blumamir)
  • template

Committers: 18

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 { GeneralAttribute } from '@opentelemetry/semantic-conventions';

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

License

Apache 2.0 - See LICENSE for more information.

Keywords

FAQs

Last updated on 28 Jul 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc