From 11e02603d1e4b7debae731de670e82d743351c10 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 18 Oct 2021 14:52:33 -0400 Subject: [PATCH 1/3] JS docs: path rename getting_started to getting-started --- content/en/_index.md | 2 +- content/en/docs/js/_index.md | 2 +- content/en/docs/js/api/context.md | 2 +- content/en/docs/js/api/tracing.md | 6 ++++-- .../js/{getting_started => getting-started}/_index.md | 3 ++- .../js/{getting_started => getting-started}/browser.md | 4 ++-- .../js/{getting_started => getting-started}/nodejs.md | 4 ++-- content/en/docs/js/instrumentation.md | 8 ++++++-- 8 files changed, 19 insertions(+), 12 deletions(-) rename content/en/docs/js/{getting_started => getting-started}/_index.md (89%) rename content/en/docs/js/{getting_started => getting-started}/browser.md (99%) rename content/en/docs/js/{getting_started => getting-started}/nodejs.md (99%) diff --git a/content/en/_index.md b/content/en/_index.md index 0848582e667b..f60f81c3ce65 100644 --- a/content/en/_index.md +++ b/content/en/_index.md @@ -20,7 +20,7 @@ Learn more - [Collector]({{< relref "/docs/collector/getting-started" >}}) - [Go]({{< relref "/docs/go/getting-started" >}}) - [.NET]({{< relref "/docs/net/getting-started" >}}) -- [JavaScript]({{< relref "/docs/js/getting_started" >}}) +- [JavaScript]({{< relref "/docs/js/getting-started" >}}) - []({{< relref "docs" >}}) {{< /blocks/cover >}} diff --git a/content/en/docs/js/_index.md b/content/en/docs/js/_index.md index 1a9c77179647..44ddbfa84d3d 100644 --- a/content/en/docs/js/_index.md +++ b/content/en/docs/js/_index.md @@ -24,6 +24,6 @@ You can find release information [here](https://github.com/open-telemetry/opente ## Further Reading - [OpenTelemetry for JavaScript on GitHub](https://github.com/open-telemetry/opentelemetry-js) -- [Getting Started](getting_started) +- [Getting Started]({{< relref "getting-started" >}}) - [API Reference](https://open-telemetry.github.io/opentelemetry-js-api) - [SDK Reference](https://open-telemetry.github.io/opentelemetry-js) diff --git a/content/en/docs/js/api/context.md b/content/en/docs/js/api/context.md index 7923a882211d..2e7fd40d15cf 100644 --- a/content/en/docs/js/api/context.md +++ b/content/en/docs/js/api/context.md @@ -1,5 +1,5 @@ --- -title: "Context" +title: Context description: OpenTelemetry JavaScript Context API Documentation weight: 2 --- diff --git a/content/en/docs/js/api/tracing.md b/content/en/docs/js/api/tracing.md index ef2513fb9807..4b3f13f3b18d 100644 --- a/content/en/docs/js/api/tracing.md +++ b/content/en/docs/js/api/tracing.md @@ -1,12 +1,12 @@ --- -title: "Tracing" +title: Tracing description: OpenTelemetry JavaScript Tracing API Documentation weight: 2 --- The following is an in-depth explanation of using the API to trace an application with OpenTelemetry JavaScript. This guide will assume an OpenTelemetry SDK is registered and will walk through only tracing concepts. -To learn how to set up the OpenTelemetry JavaScript SDK, see [Getting Started](../../getting_started) or the [API Reference](https://open-telemetry.github.io/opentelemetry-js-api). +To learn how to set up the OpenTelemetry JavaScript SDK, see [Getting Started][] or the [API Reference](https://open-telemetry.github.io/opentelemetry-js-api). _Trace API Specification: _ @@ -214,3 +214,5 @@ Consumer spans represent the processing of a job created by a producer and may s One problem with span names and attributes is recognizing, categorizing, and analyzing them in your tracing backend. Between different applications, libraries, and tracing backends there might be different names and expected values for various attributes. For example, your application may use `http.status` to describe the HTTP status code, but a library you use may use `http.status_code`. In order to solve this problem, OpenTelemetry uses a library of semantic conventions which describe the name and attributes which should be used for specific types of spans. The use of semantic conventions is always recommended where applicable, but they are merely conventions. For example, you may find that some name other than the name suggested by the semantic conventions more accurately describes your span, you may decide not to include a span attribute which is suggested by semantic conventions for privacy reasons, or you may wish to add a custom attribute which isn't covered by semantic conventions. All of these cases are fine, but please keep in mind that if you stray from the semantic conventions, the categorization of spans in your tracing backend may be affected. _See the current trace semantic conventions in the OpenTelemetry Specification repository: _ + +[Getting Started]: {{< relref "../getting-started" >}} diff --git a/content/en/docs/js/getting_started/_index.md b/content/en/docs/js/getting-started/_index.md similarity index 89% rename from content/en/docs/js/getting_started/_index.md rename to content/en/docs/js/getting-started/_index.md index 3ab3b1ca5f60..f32a26435513 100644 --- a/content/en/docs/js/getting_started/_index.md +++ b/content/en/docs/js/getting-started/_index.md @@ -1,5 +1,6 @@ --- -title: "Getting Started" +title: Getting Started +aliases: [/docs/js/getting_started] weight: 1 --- These two guides for Node.JS and the browser use simple examples in javascript to get you started with OpenTelemetry. Both will show you the following steps: diff --git a/content/en/docs/js/getting_started/browser.md b/content/en/docs/js/getting-started/browser.md similarity index 99% rename from content/en/docs/js/getting_started/browser.md rename to content/en/docs/js/getting-started/browser.md index a285fe25bfd6..84e2f2c4626d 100644 --- a/content/en/docs/js/getting_started/browser.md +++ b/content/en/docs/js/getting-started/browser.md @@ -1,6 +1,6 @@ --- -title: "Browser" -weight: 2 +title: Browser +aliases: [/docs/js/getting_started/browser] --- This guide uses the example application in HTML & javascript provided below, but the steps to instrument your own application should be broadly the same. diff --git a/content/en/docs/js/getting_started/nodejs.md b/content/en/docs/js/getting-started/nodejs.md similarity index 99% rename from content/en/docs/js/getting_started/nodejs.md rename to content/en/docs/js/getting-started/nodejs.md index 11a17f21d3fa..f50d365f0130 100644 --- a/content/en/docs/js/getting_started/nodejs.md +++ b/content/en/docs/js/getting-started/nodejs.md @@ -1,6 +1,6 @@ --- -title: "Node.JS" -weight: 2 +title: Node.JS +aliases: [/docs/js/getting_started/nodejs] --- This guide will show you how to get started with tracing in Node.js. diff --git a/content/en/docs/js/instrumentation.md b/content/en/docs/js/instrumentation.md index a6376e68e267..9d9044f530ea 100644 --- a/content/en/docs/js/instrumentation.md +++ b/content/en/docs/js/instrumentation.md @@ -1,5 +1,5 @@ --- -title: "Instrumentation" +title: Instrumentation weight: 3 --- @@ -32,7 +32,9 @@ function doWork() { ## Creating Spans -As you have learned in the previous [Getting Started](../getting_started/) guide you need a TracerProvider and an Exporter. Install the dependencies and add them to head of your application code to get started: +As you have learned in the previous [Getting Started][] guide you need a +TracerProvider and an Exporter. Install the dependencies and add them to head of +your application code to get started: ```shell npm installĀ @opentelemetry/sdk-trace-base @@ -195,3 +197,5 @@ function doWork(parent) { span.end(); } ``` + +[Getting Started]: {{< relref "getting-started" >}} From 460f1f854d26f1eebbca110a765812f9a09cb2d1 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 18 Oct 2021 15:03:07 -0400 Subject: [PATCH 2/3] Normalize alias paths --- content/en/docs/js/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/js/_index.md b/content/en/docs/js/_index.md index 44ddbfa84d3d..ebb61f8abe50 100644 --- a/content/en/docs/js/_index.md +++ b/content/en/docs/js/_index.md @@ -3,7 +3,7 @@ title: JavaScript description: >- JS logo A language-specific implementation of OpenTelemetry in JavaScript (for Node.JS & the browser). -aliases: [/js/, /js/metrics/, /js/tracing/] +aliases: [/js, /js/metrics, /js/tracing] weight: 20 --- From 1e2ead48477ba5d21e8cb844d5911b04dacf8778 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 21 Oct 2021 13:13:24 -0400 Subject: [PATCH 3/3] Copyedit to content/en/docs/js/instrumentation.md Co-authored-by: Bartlomiej Obecny --- content/en/docs/js/instrumentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/js/instrumentation.md b/content/en/docs/js/instrumentation.md index 9d9044f530ea..eb5b65b73325 100644 --- a/content/en/docs/js/instrumentation.md +++ b/content/en/docs/js/instrumentation.md @@ -33,7 +33,7 @@ function doWork() { ## Creating Spans As you have learned in the previous [Getting Started][] guide you need a -TracerProvider and an Exporter. Install the dependencies and add them to head of +TracerProvider and an Exporter. Install the dependencies and add them to the head of your application code to get started: ```shell