Skip to main content
The Deno 2 Release Candidate is here
Learn more

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.