@opentelemetry/semantic-conventions

OpenTelemetry semantic conventions

Usage no npm install needed!

<script type="module">
  import opentelemetrySemanticConventions from 'https://cdn.skypack.dev/@opentelemetry/semantic-conventions';
</script>

README

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.