From b0fc441f243aa3b29df68efd65e6fa818b6fd995 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Thu, 5 Aug 2021 00:36:31 +0530 Subject: [PATCH] Update some docs --- packages/opentelemetry-resources/README.md | 6 +++--- packages/opentelemetry-semantic-conventions/README.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/opentelemetry-resources/README.md b/packages/opentelemetry-resources/README.md index 29c1c897ac5..53a544629c3 100644 --- a/packages/opentelemetry-resources/README.md +++ b/packages/opentelemetry-resources/README.md @@ -25,11 +25,11 @@ const resource = new Resource({ [SemanticResourceAttributes.SERVICE_NAME]: 'api-service', }); -const another_resource = new Resource({ - 'service.version': 2.0.0, +const anotherResource = new Resource({ + 'service.version': '2.0.0', 'service.group': 'instrumentation-group' }); -const merged_resource = resource.merge(another_resource); +const mergedResource = resource.merge(anotherResource); ``` ## Useful links diff --git a/packages/opentelemetry-semantic-conventions/README.md b/packages/opentelemetry-semantic-conventions/README.md index ad77beb69ab..b31500dd925 100644 --- a/packages/opentelemetry-semantic-conventions/README.md +++ b/packages/opentelemetry-semantic-conventions/README.md @@ -16,11 +16,11 @@ npm install --save @opentelemetry/semantic-conventions ## Usage ```ts -import { GeneralAttribute } from '@opentelemetry/semantic-conventions'; +import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; const span = tracer.startSpan().startSpan(spanName, spanOptions) .setAttributes({ - [GeneralAttribute.NET_PEER_HOSTNAME]: 'localhost', + [SemanticAttributes.NET_PEER_NAME]: 'localhost', }); ```