diff --git a/config.toml b/config.toml index 6216ed16204d..7a19dcbf3ed6 100644 --- a/config.toml +++ b/config.toml @@ -57,3 +57,45 @@ localUrl = "/about" [[params.links]] name = "Get Started" localUrl = "/get-started" + +[menu] + +[[menu.docs]] + name = "JavaScript" + url = "https://open-telemetry.github.io/opentelemetry-js/" + +[[menu.docs]] + name = "Go" + url = "https://github.com/open-telemetry/opentelemetry-go/blob/master/README.md" + +[[ menu.docs ]] + name = "Python" + url = "https://opentelemetry-python.readthedocs.io/" + +[[ menu.docs ]] + name = "Java" + url = "https://github.com/open-telemetry/opentelemetry-java/blob/master/QUICKSTART.md" + +[[ menu.docs ]] + name = "Erlang" + url = "https://github.com/open-telemetry/opentelemetry-erlang/blob/master/README.md" + +[[ menu.docs ]] + name = "Collector" + url = "https://github.com/open-telemetry/opentelemetry-collector/blob/master/README.md" + +[[ menu.docs ]] + name = "C++" + url = "https://github.com/open-telemetry/opentelemetry-cpp/blob/master/README.md" + +[[ menu.docs ]] + name = "Rust" + url = "https://github.com/open-telemetry/opentelemetry-rust/blob/master/README.md" + +[[ menu.docs ]] + name = "Ruby" + url = "https://github.com/open-telemetry/opentelemetry-ruby/blob/master/README.md" + +[[ menu.docs ]] + name = "C#" + url = "https://github.com/open-telemetry/opentelemetry-dotnet/blob/master/README.md" diff --git a/content/docs/_index.md b/content/docs/_index.md deleted file mode 100644 index db998165008a..000000000000 --- a/content/docs/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "Documentation" -weight: 1 ---- - -This section contains the documentation for OpenTelemetry. diff --git a/content/docs/csharp/_index.md b/content/docs/csharp/_index.md deleted file mode 100644 index 5e535f3f5256..000000000000 --- a/content/docs/csharp/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "C#" ---- - -This page contains documentation for OpenTelemetry .NET. diff --git a/content/docs/csharp/metrics.md b/content/docs/csharp/metrics.md deleted file mode 100644 index 94d6148cd36e..000000000000 --- a/content/docs/csharp/metrics.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Metrics" ---- - -This page contains documentation for OpenTelemetry .NET. - -# Quick Start - -# API Reference diff --git a/content/docs/csharp/tracing.md b/content/docs/csharp/tracing.md deleted file mode 100644 index e03fcdf32885..000000000000 --- a/content/docs/csharp/tracing.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "Tracing" ---- - -This page contains documentation for OpenTelemetry .NET. - -**Note**: OpenTelemetry .NET is in _alpha_ and should not be deployed to production systems. - -# Quick Start - -1. Install OpenTelemetry via [NuGet](https://www.nuget.org/packages/OpenTelemetry) along with an exporter such as [Zipkin](https://www.nuget.org/packages/OpenTelemetry.Exporter.Zipkin) or [Jaeger](https://www.nuget.org/packages/OpenTelemetry.Exporter.Jaeger). -2. Create a `Tracer` through the `TracerFactory`, as shown: - -``` -var tracerFactory = TracerFactory.Create( - builder => builder.AddProcessorPipeline( - c => c.SetExporter(new JaegerTraceExporter(jaegerOptions)))); -``` - -3. Get a reference to your `Tracer` from the `TracerFactory` using the `GetTracer()` method. -4. Start a span, then add attributes or events to it as desired, as seen here: - -``` -using (tracer.StartActiveSpan("test", out var span)) -{ - span.SetAttribute("custom-attribute", 219); - span.AddEvent("hello world"); -} -// the span will automatically complete when it goes out of scope here. -``` - -You can find more exporters and examples of how to use them [here](https://github.com/open-telemetry/opentelemetry-dotnet/tree/master/samples/Exporters). - -See the [README](https://github.com/open-telemetry/opentelemetry-dotnet/blob/master/README.md) for the most up-to-date information on configuring and using OpenTelemetry .NET. - -# API Reference - -Please see the [GitHub Repository](https://github.com/open-telemetry/opentelemetry-dotnet) for more information on the API. diff --git a/content/docs/golang/_index.md b/content/docs/golang/_index.md deleted file mode 100644 index 741fe5c0fe27..000000000000 --- a/content/docs/golang/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Go" ---- - -This page contains documentation for OpenTelemetry Go. diff --git a/content/docs/golang/metrics.md b/content/docs/golang/metrics.md deleted file mode 100644 index 0f98d7fcfcda..000000000000 --- a/content/docs/golang/metrics.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Metrics" ---- - -This page contains documentation for OpenTelemetry Go. - -# Quick Start - -# API Reference diff --git a/content/docs/golang/tracing.md b/content/docs/golang/tracing.md deleted file mode 100644 index 1d366f900ac0..000000000000 --- a/content/docs/golang/tracing.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: "Tracing" ---- - -This page contains documentation for OpenTelemetry Go. - -# Quick Start - -**Please note** that this library is currently in *alpha*, and shouldn't be used in production environments. - -First let's install the API and SDK packages - -```bash -go get -u go.opentelemetry.io/otel -``` - -From there, you should be able to use opentelemetry as per the following: - -```go -package main - -import ( - "context" - "log" - - "go.opentelemetry.io/otel/api/global" - "go.opentelemetry.io/otel/exporter/trace/stdout" - sdktrace "go.opentelemetry.io/otel/sdk/trace" -) - -// initTracer creates and registers trace provider instance. -func initTracer() { - var err error - exp, err := stdout.NewExporter(stdout.Options{PrettyPrint: false}) - if err != nil { - log.Panicf("failed to initialize stdout exporter %v\n", err) - return - } - tp, err := sdktrace.NewProvider(sdktrace.WithSyncer(exp), - sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()})) - if err != nil { - log.Panicf("failed to initialize trace provider %v\n", err) - } - global.SetTraceProvider(tp) -} - -func main() { - initTracer() - tracer := global.TraceProvider().Tracer("ex.com/basic") - - ctx := context.Background() - - err := tracer.WithSpan(ctx, "foo", func(ctx context.Context) error { - return tracer.WithSpan(ctx, "bar", func(ctx context.Context) error { - return tracer.WithSpan(ctx, "baz", func(ctx context.Context) error { - return nil - }) - }) - }) - if err != nil { - panic(err) - } -} - -``` -Running the code will output trace information to the console: - -```bash -go run tracer.go -{"SpanContext":{"TraceID":"04186bc51ac90591f5595f83f83657ce","SpanID":"01b7b5255b43f488","TraceFlags":1},"ParentSpanID":"0dee29eb8612c467","SpanKind":1,"Name":"ex.com/basic/baz","StartTime":"2019-11-14T19:57:41.339673-08:00","EndTime":"2019-11-14T19:57:41.339675819-08:00","Attributes":null,"MessageEvents":null,"Links":null,"Status":0,"HasRemoteParent":false,"DroppedAttributeCount":0,"DroppedMessageEventCount":0,"DroppedLinkCount":0,"ChildSpanCount":0} -{"SpanContext":{"TraceID":"04186bc51ac90591f5595f83f83657ce","SpanID":"0dee29eb8612c467","TraceFlags":1},"ParentSpanID":"42537c10ad93be38","SpanKind":1,"Name":"ex.com/basic/bar","StartTime":"2019-11-14T19:57:41.339671-08:00","EndTime":"2019-11-14T19:57:41.340046523-08:00","Attributes":null,"MessageEvents":null,"Links":null,"Status":0,"HasRemoteParent":false,"DroppedAttributeCount":0,"DroppedMessageEventCount":0,"DroppedLinkCount":0,"ChildSpanCount":1} -{"SpanContext":{"TraceID":"04186bc51ac90591f5595f83f83657ce","SpanID":"42537c10ad93be38","TraceFlags":1},"ParentSpanID":"0000000000000000","SpanKind":1,"Name":"ex.com/basic/foo","StartTime":"2019-11-14T19:57:41.339664-08:00","EndTime":"2019-11-14T19:57:41.340058439-08:00","Attributes":null,"MessageEvents":null,"Links":null,"Status":0,"HasRemoteParent":false,"DroppedAttributeCount":0,"DroppedMessageEventCount":0,"DroppedLinkCount":0,"ChildSpanCount":1} -``` - -# API Reference - -See the [API documentation](https://go.opentelemetry.io/otel/) for more detail, and the [opentelemetry-go/examples](https://github.com/open-telemetry/opentelemetry-go/tree/master/example) folder for additional examples. diff --git a/content/docs/index.md b/content/docs/index.md new file mode 100644 index 000000000000..87e95d234abe --- /dev/null +++ b/content/docs/index.md @@ -0,0 +1,100 @@ +--- +title: "Documentation" +aliases: + - /csharp/ + - /csharp/metrics/ + - /csharp/tracing/ + - /golang/ + - /golang/metrics/ + - /golang/tracing/ + - /java/ + - /java/metrics/ + - /java/tracing/ + - /js/ + - /js/metrics/ + - /js/tracing/ + - /python/ + - /python/metrics/ + - /python/tracing/ + - /ruby/ + - /ruby/metrics/ + - /ruby/tracing/ +weight: 1 +--- + +_Note: For documentation and guides on specific languages, please follow the link in the navigation bar for the language SDK or project you're interested in. This page contains general information about how OpenTelemetry works._ + +OpenTelemetry is a set of APIs, SDKs, tooling and integrations that are designed for the creation and management of _telemetry data_ such as traces, metrics, and logs. This documentation page is intended to broadly cover key terms, concepts, and instructions on how to use OpenTelemetry in your software. + +## Basic Concepts + +As with any technology, there are some fundamental concepts that you'll need to be familiar with in order to understand and use OpenTelemetry to its fullest. This section will cover basic terminology and concepts that the OpenTelemetry API expresses. + +### Tracing + +A _trace_ is a collection of _spans_, which are objects that represent the work being done by individual services or components involved in a request as it flows through a system. A span contains a _span context_, which is a set of globally unique identifiers that represent the unique request that each span is a part of. Your system may handle dozens, hundreds, thousands, or millions of requests per second -- each of these requests would have a single _trace identifier_, and each span in that request would have a unique _span identifier_. This span context is _immutable_ and cannot be modified after creation. + +A trace contains a single _root span_ which encapsulates the end-to-end latency for the entire request. You can think of this as a single logical operation, such as clicking a button in a web application to add a product to a shopping cart. The root span would measure the time it took from an end-user clicking that button to the operation being completed or failing (so, the item is added to the cart or some error occurs) and the result being displayed to the user. A trace is comprised of the single root span and any number of _child spans_, which represent operations taking place as part of the request. Each span contains metadata about the operation, such as its name, start and end timestamps, attributes, events, and status. + +To create and manage these spans, the OpenTelemetry API provides the _tracer_ interface. This object is responsible for tracking the _active span_ in your process, and allows you to access the current span in order to perform operations on it such as adding attributes, events, and finishing it when the work it tracks is complete. One or more tracer objects can be created in a process through the _tracer provider_, a factory interface that allows for multiple tracers to be instantiated in a single process with different options. + +Generally, the lifecycle of a span resembles the following: +* A request is received by a service. The span context is _extracted_ from the request headers, if it exists. +* A new span is created as a child of the extracted span context; If none exists, a new root span is created. +* The service handles the request. Additional attributes and events are added to the span that are useful for understanding the context of the request, such as the hostname of the machine handling the request, or customer identifiers. +* New spans may be created to represent work being done by sub-components of the service. +* When the service makes a remote call to another service, the current span context is serialized and forwarded to the next service by _injecting_ the span context into the headers or message envelope. +* The work being done by the service completes, successfully or not. The span status is appropriately set, and the span is marked finished. + +### Metrics + +A _metric_ is some raw measurement about a service, captured at runtime. Logically, the moment of capturing one of these measurements is known as a _metric event_ which consists not only of the measurement itself, but the time that it was captured. These raw measurements are then used by monitoring and alerting systems to provide statistical data about the performance of a service or system. + +OpenTelemetry defines three _metric instruments_ that are intended for different purposes. These instruments are the _counter_, _measure_, and _observer_. A counter is a value that is summed over time -- you can think of this like an odometer on a car; It only ever goes up. A measure is a value that is aggregated over time. This is more akin to the trip odometer on a car, it represents a value over some defined range. An observer captures a current set of values at a particular point in time, like a fuel gauge in a vehicle. + +In addition to the three metric instruments, the concept of _aggregations_ is an important one to understand. An aggregation is a technique whereby a large number of measurements are combined into either exact or estimated statistics about metric events that took place during a time window. The API itself does not allow you to specify these aggregations, but provides some default ones -- please see the specification and SDK documentation for more detail here. In general, the OpenTelemetry SDK provides for common aggregations (such as sum, count, last value, and histograms) that are supported by visualizers and telemetry backends. + +Unlike request tracing, which is intended to capture request lifecycles and provide context to the individual pieces of a request, metrics are intended to provide statistical information in aggregate. Some examples of use cases for metrics include: +* Reporting the total number of bytes read by a service, per protocol type. +* Reporting the total number of bytes read and the bytes per request. +* Reporting the duration of a system call. +* Reporting request sizes in order to determine a trend. +* Reporting CPU or memory usage of a process. +* Reporting average balance values from an account. +* Reporting current active requests being handled. + +### Context + +It is first necessary to disambiguate _context_ as a term in OpenTelemetry. When we refer to context, we may be referring not only to its logical usage -- the circumstances surrounding an event in your service -- but also to specific types of context, like a trace's span context. OpenTelemetry also specifies a generalized _telemetry context_ that is known as the _correlation context_, which is a set of keys and values that can be serialized and propagated between services that are using OpenTelemetry. + +The correlation context is used to provide annotations and metadata from one service to the next -- you can use it, for example, to propagate values from a client process to a server process. These values can be added to telemetry data emitted by the child service, or used for other purposes (such as conditional execution of program logic) as required. Context can also be propagated _within_ a service, from function to function. + +When we talk about context _propagation_, we're either referring to the act of serializing and deserializing a context object and passing it to a new service, or we're referring to passing it from thread to thread (or thread-like object) in a service. The specifics of this depend heavily on individual language features, so please refer to the language-specific documentation for OpenTelemetry to learn more about the details of context propagation for that language. For service-to-service communication (often referred to as an _RPC_, a remote process call) you'll see references to _injecting_ and _extracting_ context from the RPC headers or envelope. + +## Installing and Configuring OpenTelemetry + +The exact installation mechanism for OpenTelemetry varies based on the language you're developing in, but there are some similarities that we'll cover here. + +### Import the OpenTelemetry API and SDK + +You'll first need to import OpenTelemetry to your service code. If you're developing a library or some other component that is intended to be consumed by a runnable binary, then you would only take a dependency on the API. If your artifact is a standalone process or service, then you would take a dependency on the API and the SDK. + +### Configure the OpenTelemetry API + +In order to create traces or metrics, you'll need to first create a tracer and/or meter provider. In general, we reccomend that the SDK should provide a single default provider for these objects. You'll then get a tracer or meter instance from that provider, and give it a name and version. The name you choose here should identify what exactly is being instrumented -- if you're writing a library, for example, then you should name it after your library (i.e., `com.legitimatebusiness.myLibrary` or some other unique identifier) as this name will namespace all spans or metric events produced. It is also reccomended that you supply a version string (i.e., `semver:1.0.0`) that corresponds to the current version of your library or service. + +### Configure the OpenTelemetry SDK + +If you're building a service process, you'll also need to configure the SDK with appropriate options for exporting your telemetry data to some analysis backend. We recommend that this configuration be handled programmatically through a configuration file or some other mechanism. There are also per-language tuning options you may wish to take advantage of. + +### Create Telemetry Data + +Once you've configured the API and SDK, you'll then be free to create traces and metric events through the tracer and meter objects you obtained from the provider. You can also utilize a plugin or integration to create traces and metric events for you -- check out the [registry](/registry) or your language's repository for more information on these. + +## Exporting Data + +Once you've creataed telemetry data, you'll want to send it somewhere. OpenTelemetry supports two primary methods of exporting data from your process to an analysis backend, either directly from a process or by proxying it through the OpenTelemetry Collector. + +In-process export requires you to import and take a dependency on one or more _exporters_, libraries that translate OpenTelemetry's in-memory span and metric objects into the appropriate format for telemetry analysis tools like Jaeger or Prometheus. In addition, OpenTelemetry supports a wire protocol known as _OTLP_, which is supported by all OpenTelemetry SDKs. This protocol can be used to send data to the OpenTelemetry Collector, a standalone binary process that can be run as a proxy or sidecar to your service instances or run on a separate host. The collector can then be configured to forward and export this data to your choice of analysis tools. + +In addition to open source tools such as Jaeger or Prometheus, a growing list of companies support ingesting telemetry data from OpenTelemetry. Please see [this page](/vendors) for more details. diff --git a/content/docs/java/_index.md b/content/docs/java/_index.md deleted file mode 100644 index fadc5f15f8ea..000000000000 --- a/content/docs/java/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Java" ---- - -This page contains documentation for OpenTelemetry Java. diff --git a/content/docs/java/metrics.md b/content/docs/java/metrics.md deleted file mode 100644 index 4ec0a6d4128c..000000000000 --- a/content/docs/java/metrics.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Metrics" ---- - -This page contains documentation for OpenTelemetry Java. - -# Quick Start - -# API Reference diff --git a/content/docs/java/tracing.md b/content/docs/java/tracing.md deleted file mode 100644 index bc7d6fa2fb9d..000000000000 --- a/content/docs/java/tracing.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: "Tracing" ---- - -This page contains documentation for OpenTelemetry Java. - -# Quick Start - -**Please note** that this library is currently in *alpha*, and shouldn't be used in production environments. - -First, you'll need to import the OpenTelemetry API and/or SDK into your project. - -**Maven** - -```xml - - - oss.sonatype.org-snapshot - https://oss.jfrog.org/artifactory/oss-snapshot-local - - - - - - io.opentelemetry - opentelemetry-api - 0.2.0-SNAPSHOT - - -``` - -**Gradle** - -```groovy -repositories { - maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' } -} - -dependencies { - compile('io.opentelemetry:opentelemetry-api:0.2.0-SNAPSHOT') -} -``` - -Libraries will usually only need `opentelemetry-api`, while applications -may want to use `opentelemetry-sdk`. - -Next, import the necessary classes in your code. - -```java -import io.opentelemetry.trace.Tracer; -import io.opentelemetry.exporters.inmemory.InMemorySpanExporter; -``` - -Finally, create a tracer and exporter, then start creating spans. - -```java -private final InMemorySpanExporter exporter = InMemorySpanExporter.create(); -private final Tracer tracer = createTracer("tracer", exporter); - -Span span = tracer.spanBuilder("test").startSpan(); -// do work -span.end(); -``` - -# API Reference diff --git a/content/docs/js/Exporter configuration guide for Jaeger.md b/content/docs/js/Exporter configuration guide for Jaeger.md deleted file mode 100644 index f2feb544976b..000000000000 --- a/content/docs/js/Exporter configuration guide for Jaeger.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: Exporter configuration guide for Jaeger -draft: true ---- - -### Installing Jaeger locally - -Download the Jaeger components: https://www.jaegertracing.io/download/ - -Then get Jaeger up and running : (https://www.jaegertracing.io/docs/1.17/getting-started/) - -You can then navigate to http://localhost:16686 to access the Jaeger UI. - -### Exporting traces from your application to Jaeger - -Import the Jaeger Exporter in your application -```typeScript -const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); -``` -#### Declare the config options -```javascript -const options = { - serviceName: string, //example:'basic-service' - tags: '', //optional - host : string, //default:'localhost' - port : number, //default: 6832 - maxPacketSize: number, // default: 65000 - // Force a flush on shutdown - forceFlush: boolean; // default: true - //Time to wait for an onShutdown flush to finish before closing the sender - flushTimeout: number, // default: 2000 - logger: { - 'error': { - 'message': string, - 'args': any, - }, - 'warn': { - 'message': string, - 'args': any, - }, - 'info': { - 'message': string, - 'args': any, - }, - 'debug': { - 'message': string, - 'args': any, - }, - }, //default: {} - }; -``` -#### Initialize the exporter -```javascript -exporter = new JaegerExporter(options); -``` diff --git a/content/docs/js/_index.md b/content/docs/js/_index.md deleted file mode 100644 index 85f45756e5c4..000000000000 --- a/content/docs/js/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "JavaScript" -weight: 1 ---- - -This page contains documentation for OpenTelemetry JS. diff --git a/content/docs/js/metrics.md b/content/docs/js/metrics.md deleted file mode 100644 index 664f60e9e1a2..000000000000 --- a/content/docs/js/metrics.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "Metrics" ---- - -This page contains documentation for OpenTelemetry JS. - -# Quick Start - -# API Reference - -See the [API documentation](https://open-telemetry.github.io/opentelemetry-js/interfaces/meter.html) for more detail, and the [opentelemetry-basic-app](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/prometheus) for a complete example. diff --git a/content/docs/js/tracing.md b/content/docs/js/tracing.md deleted file mode 100644 index 68b22b4b1228..000000000000 --- a/content/docs/js/tracing.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "Tracing" ---- - -This page contains documentation for OpenTelemetry JS. - -# Quick Start - -**Please note** that this library is currently in *alpha*, and shouldn't be used in production environments. - -To begin, install the appropriate packages via your package manager. - -```bash -npm install --save @opentelemetry/api -npm install --save @opentelemetry/tracing -npm install --save @opentelemetry/exporter-jaeger -``` - -Next, import the OpenTelemetry packages and Jaeger exporter and initialize them. - -```js -const opentelemetry = require('@opentelemetry/api'); -const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/tracing'); -const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); - -const exporter = new JaegerExporter({ - serviceName: 'myService' -}); - -const provider = new BasicTracerProvider(); - -provider.addSpanProcessor(new SimpleSpanProcessor(exporter)); -opentelemetry.trace.setGlobalTracerProvider(provider); -``` - -Now, you're ready to create spans! - -```js -const tracer = opentelemetry.trace.getTracer('example-basic-tracer-node'); -const span = tracer.startSpan('main'); -for (let i = 0; i < 10; i++) { - doWork(span); -} -// Be sure to end the span. -span.end(); - -// flush and close the connection. -exporter.shutdown(); - -function doWork(parent) { - // Start another span. In this example, the main method already started a - // span, so that'll be the parent span, and this will be a child span. - const span = tracer.startSpan('doWork', { - parent: parent - }); - - // simulate some random work. - for (let i = 0; i <= Math.floor(Math.random() * 40000000); i++) { } - - // Set attributes to the span. - span.setAttribute('key', 'value'); - - // Annotate our span to capture metadata about our operation - span.addEvent('invoking doWork'); - - span.end(); -} -``` -See [this GitHub repository](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/basic-tracer-node) for a working code sample in node.js. - -Looking for an example of how to use OpenTelemetry in the browser? [Check out this GitHub repository](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples). - -# API Reference - -See the [API documentation](https://open-telemetry.github.io/opentelemetry-js/interfaces/tracer.html) for more detail, and the [opentelemetry-basic-app](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/basic-tracer-node) for a complete example. diff --git a/content/docs/python/_index.md b/content/docs/python/_index.md deleted file mode 100644 index dcc13862e12c..000000000000 --- a/content/docs/python/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "Python" -weight: 1 ---- - -This page contains documentation for OpenTelemetry Python. diff --git a/content/docs/python/metrics.md b/content/docs/python/metrics.md deleted file mode 100644 index 4eece3b8331a..000000000000 --- a/content/docs/python/metrics.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Metrics" ---- - -This page contains documentation for OpenTelemetry Python. - -# Quick Start - -# API Reference - diff --git a/content/docs/python/tracing.md b/content/docs/python/tracing.md deleted file mode 100644 index 1f4b9e62addc..000000000000 --- a/content/docs/python/tracing.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "Tracing" ---- - -This page contains documentation for OpenTelemetry Python. - -# Quick Start - -**Please note** that this library is currently in *alpha*, and shouldn't be used in production environments. - -The API and SDK packages are available on PyPI, and can installed via `pip`: - -```bash -pip install opentelemetry-api -pip install opentelemetry-sdk -``` - -From there, you should be able to use opentelemetry as per the following: - -```python -from opentelemetry import trace -from opentelemetry.sdk.trace import TracerSource -from opentelemetry.sdk.trace.export import ConsoleSpanExporter -from opentelemetry.sdk.trace.export import SimpleExportSpanProcessor - -trace.set_preferred_tracer_source_implementation(lambda T: TracerSource()) -trace.tracer_source().add_span_processor( - SimpleExportSpanProcessor(ConsoleSpanExporter()) -) -tracer = trace.get_tracer(__name__) -with tracer.start_as_current_span("foo"): - with tracer.start_as_current_span("bar"): - with tracer.start_as_current_span("baz"): - print("Hello world from OpenTelemetry Python!") -``` - -Running the code will output trace information to the console: - -```bash -Hello world from OpenTelemetry Python! -Span(name="baz", context=SpanContext(trace_id=0xa1d5d85f3751e579d3fb1d6ba369fa9e, span_id=0x90b06c276c8baf02, trace_state={}), kind=SpanKind.INTERNAL, parent=Span(name="bar", context=SpanContext(trace_id=0xa1d5d85f3751e579d3fb1d6ba369fa9e, span_id=0x0724307563ed8af8, trace_state={})), start_time=2020-03-05T20:12:50.579048Z, end_time=2020-03-05T20:12:50.579073Z) -Span(name="bar", context=SpanContext(trace_id=0xa1d5d85f3751e579d3fb1d6ba369fa9e, span_id=0x0724307563ed8af8, trace_state={}), kind=SpanKind.INTERNAL, parent=Span(name="foo", context=SpanContext(trace_id=0xa1d5d85f3751e579d3fb1d6ba369fa9e, span_id=0xddadf519247d5d05, trace_state={})), start_time=2020-03-05T20:12:50.579032Z, end_time=2020-03-05T20:12:50.579142Z) -Span(name="foo", context=SpanContext(trace_id=0xa1d5d85f3751e579d3fb1d6ba369fa9e, span_id=0xddadf519247d5d05, trace_state={}), kind=SpanKind.INTERNAL, parent=None, start_time=2020-03-05T20:12:50.579000Z, end_time=2020-03-05T20:12:50.579195Z) -``` - -# API Reference - -See the [API documentation](https://open-telemetry.github.io/opentelemetry-python/) for more detail, and the [opentelemetry-example-app](https://github.com/open-telemetry/opentelemetry-python/blob/master/examples/opentelemetry-example-app/README.rst) for a complete example. diff --git a/content/docs/ruby/_index.md b/content/docs/ruby/_index.md deleted file mode 100644 index dbf521e707ad..000000000000 --- a/content/docs/ruby/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "Ruby" -weight: 1 ---- - -This page contains documentation for OpenTelemetry Ruby. diff --git a/content/docs/ruby/metrics.md b/content/docs/ruby/metrics.md deleted file mode 100644 index 125e3ddada7d..000000000000 --- a/content/docs/ruby/metrics.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Metrics" ---- - -This page contains documentation for OpenTelemetry Ruby. - -# Quick Start - -# API Reference - diff --git a/content/docs/ruby/tracing.md b/content/docs/ruby/tracing.md deleted file mode 100644 index f0455606b1a9..000000000000 --- a/content/docs/ruby/tracing.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: "Tracing" ---- - -This page contains documentation for OpenTelemetry Ruby. - -# Quick Start - -**Please note** that this library is currently in *alpha*, and shouldn't be used in production environments. - -The API and SDK packages are available on [rubygems.org](https://rubygems.org/), and can installed via `bundler`: - -```bash -bundle install opentelemetry-api -bundle install opentelemetry-sdk -``` - -From there, you should be able to use opentelemetry as per the following: - -```ruby -require 'opentelemetry/sdk' - -# Set preferred tracer implementation: -SDK = OpenTelemetry::SDK - -factory = OpenTelemetry.tracer_factory = SDK::Trace::TracerFactory.new -factory.add_span_processor( - SDK::Trace::Export::SimpleSpanProcessor.new( - SDK::Trace::Export::ConsoleSpanExporter.new - ) -) - -tracer = factory.tracer('my_app_or_gem', Gem.loaded_specs['my_app_or_gem']&.version.to_s) -tracer.in_span('foo') do |foo_span| - tracer.in_span('bar') do |bar_span| - tracer.in_span('baz') do |baz_span| - pp baz_span - end - end -end -``` - -# API Reference - -See the [API documentation](https://github.com/open-telemetry/opentelemetry-ruby) for more detail, and the [opentelemetry-example-app](https://github.com/open-telemetry/opentelemetry-ruby/tree/master/examples/http) for a complete example. \ No newline at end of file diff --git a/content/vendors.md b/content/vendors.md new file mode 100644 index 000000000000..ce3cc87ed201 --- /dev/null +++ b/content/vendors.md @@ -0,0 +1,5 @@ +--- +title: "Vendors supporting OpenTelemetry" +--- + +This page collects vendors that support OpenTelemetry. diff --git a/data/nav.yaml b/data/nav.yaml index 06c0512d324d..ed7d89e2f476 100644 --- a/data/nav.yaml +++ b/data/nav.yaml @@ -1,17 +1,32 @@ - name: About url: "/about" -- name: Specification - url: "https://github.com/open-telemetry/opentelemetry-specification/blob/master/README.md" -- name: "Documentation" - url: "/docs" -- headerName: "Project" - headerValues: - - name: "Project Status" - url: "/project-status" - - name: "Get Involved" - url: "/get-involved" -- name: "Blog" - url: "https://medium.com/opentelemetry" +- name: "Project" + url: "/project-status" - name: "Registry" url: "/registry" +- headerName: "Documentation" + headerUrl: "/docs" + headerValues: + - name: "JavaScript" + url: "https://open-telemetry.github.io/opentelemetry-js/" + - name: "Go" + url: "https://github.com/open-telemetry/opentelemetry-go/blob/master/README.md" + - name: "Python" + url: "https://opentelemetry-python.readthedocs.io/" + - name: "Java" + url: "https://github.com/open-telemetry/opentelemetry-java/blob/master/QUICKSTART.md" + - name: "C#" + url: "https://github.com/open-telemetry/opentelemetry-dotnet/blob/master/README.md" + - name: "Ruby" + url: "https://github.com/open-telemetry/opentelemetry-ruby/blob/master/README.md" + - name: "Rust" + url: "https://github.com/open-telemetry/opentelemetry-rust/blob/master/README.md" + - name: "C++" + url: "https://github.com/open-telemetry/opentelemetry-cpp/blob/master/README.md" + - name: "Erlang" + url: "https://github.com/open-telemetry/opentelemetry-erlang/blob/master/README.md" + - name: "Collector" + url: "https://github.com/open-telemetry/opentelemetry-collector/blob/master/README.md" + - name: "Specification" + url: "https://github.com/open-telemetry/opentelemetry-specification/blob/master/README.md" diff --git a/layouts/partials/docs/layout.html b/layouts/partials/docs/layout.html index e87d6fc037a6..50907e8949bf 100644 --- a/layouts/partials/docs/layout.html +++ b/layouts/partials/docs/layout.html @@ -1,9 +1,6 @@
-
- {{ partial "docs/sidebar.html" . }} -

{{ .Title }} diff --git a/layouts/partials/docs/sidebar.html b/layouts/partials/docs/sidebar.html index 759aeefdee42..abb65be7f318 100644 --- a/layouts/partials/docs/sidebar.html +++ b/layouts/partials/docs/sidebar.html @@ -1,26 +1,22 @@ -{{ $here := .RelPermalink }} -{{ $docsSections := where site.Sections "Section" "docs" }} -

diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 617fc0530d45..bb7d558cb285 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -17,10 +17,10 @@ {{ .name }} {{- else }}