1.5 KiB
1.5 KiB
OpenTelemetry Semantic Conventions
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
- For more information on OpenTelemetry, visit: https://opentelemetry.io/
- For more about OpenTelemetry JavaScript: https://github.com/open-telemetry/opentelemetry-js
- For help or feedback on this project, join us in GitHub Discussions
License
Apache 2.0 - See LICENSE for more information.