Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 2.14 KB

File metadata and controls

47 lines (34 loc) · 2.14 KB

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',
  });

Useful links

License

Apache 2.0 - See LICENSE for more information.