Skip to content

Commit

Permalink
Enable Prettier check over demo docs (#2408)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Feb 27, 2023
1 parent 3e48a87 commit f9cb26f
Show file tree
Hide file tree
Showing 32 changed files with 442 additions and 373 deletions.
1 change: 0 additions & 1 deletion .prettierignore
Expand Up @@ -25,7 +25,6 @@ package-lock.json
/assets/**/*.js
/content/en/blog/2019
/content/en/blog/2021
/content/en/docs/demo
/data
/resources
/scripts
Expand Down
29 changes: 15 additions & 14 deletions content/en/docs/demo/_index.md
Expand Up @@ -21,19 +21,19 @@ Want to deploy the demo and see it in action? Start here.
Want to understand how a particular language's instrumentation works? Start
here.

| Language | Auto Instrumentation | Manual Instrumentation |
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| .NET | [Cart Service](services/cart/) | [Cart Service](services/cart/) |
| C++ | | [Currency Service](services/currency/) |
| Erlang/Elixir | [Feature Flag Service](services/feature-flag/) | [Feature Flag Service](services/feature-flag/) |
| Go | [Accounting Service](services/accounting/), [Checkout Service](services/checkout/), [Product Catalog Service]( services/product-catalog/ ) | [Checkout Service](services/checkout/), [Product Catalog Service]( services/product-catalog/ ) |
| Java | [Ad Service](services/ad/) | [Ad Service](services/ad/) |
| JavaScript | [Frontend]( services/frontend/ ) | [Frontend](services/frontend/), [Payment Service](services/payment/) |
| Kotlin | [Fraud Detection Service]( services/fraud-detection/ ) | |
| PHP | [Quote Service](services/quote/) | [Quote Service](services/quote/) |
| Python | [Recommendation Service](services/recommendation/) | [Recommendation Service](services/recommendation/) |
| Ruby | [Email Service](services/email/) | [Email Service](services/email/) |
| Rust | [Shipping Service](services/shipping/) | [Shipping Service](services/shipping/) |
| Language | Auto Instrumentation | Manual Instrumentation |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| .NET | [Cart Service](services/cart/) | [Cart Service](services/cart/) |
| C++ | | [Currency Service](services/currency/) |
| Erlang/Elixir | [Feature Flag Service](services/feature-flag/) | [Feature Flag Service](services/feature-flag/) |
| Go | [Accounting Service](services/accounting/), [Checkout Service](services/checkout/), [Product Catalog Service](services/product-catalog/) | [Checkout Service](services/checkout/), [Product Catalog Service](services/product-catalog/) |
| Java | [Ad Service](services/ad/) | [Ad Service](services/ad/) |
| JavaScript | [Frontend](services/frontend/) | [Frontend](services/frontend/), [Payment Service](services/payment/) |
| Kotlin | [Fraud Detection Service](services/fraud-detection/) | |
| PHP | [Quote Service](services/quote/) | [Quote Service](services/quote/) |
| Python | [Recommendation Service](services/recommendation/) | [Recommendation Service](services/recommendation/) |
| Ruby | [Email Service](services/email/) | [Email Service](services/email/) |
| Rust | [Shipping Service](services/shipping/) | [Shipping Service](services/shipping/) |

## Service Documentation

Expand Down Expand Up @@ -63,7 +63,8 @@ We'll be adding more scenarios over time.

- Generate a [Product Catalog error](feature-flags) for `GetProduct` requests
with product id: `OLJCESPC7Z` using the Feature Flag service
- Discover a memory leak and diagnose it using metrics and traces. [Read more](scenarios/recommendation-cache/)
- Discover a memory leak and diagnose it using metrics and traces.
[Read more](scenarios/recommendation-cache/)

## Reference

Expand Down
16 changes: 7 additions & 9 deletions content/en/docs/demo/architecture.md
Expand Up @@ -4,9 +4,9 @@ linkTitle: Architecture
aliases: [/docs/demo/current_architecture]
---

**OpenTelemetry Demo** is composed of microservices written in different programming
languages that talk to each other over gRPC and HTTP; and a load generator which
uses [Locust](https://locust.io/) to fake user traffic.
**OpenTelemetry Demo** is composed of microservices written in different
programming languages that talk to each other over gRPC and HTTP; and a load
generator which uses [Locust](https://locust.io/) to fake user traffic.

```mermaid
graph TD
Expand Down Expand Up @@ -114,14 +114,12 @@ classDef typescript fill:#e98516,color:black;
```

Follow these links for the current state of
[metric](/docs/demo/metric-features/)
and
[trace](/docs/demo/trace-features/)
instrumentation of the demo applications.
[metric](/docs/demo/metric-features/) and [trace](/docs/demo/trace-features/)
instrumentation of the demo applications.

The collector is configured in
[otelcol-config.yml](https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/otelcollector/otelcol-config.yml),
alternative exporters can be configured here.
[otelcol-config.yml](https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/otelcollector/otelcol-config.yml),
alternative exporters can be configured here.

```mermaid
graph TB
Expand Down
6 changes: 3 additions & 3 deletions content/en/docs/demo/development.md
Expand Up @@ -3,9 +3,9 @@ title: Development
---

Development for this demo requires tooling in several programming languages.
Minimum required versions will be noted where possible, but it is recommended
to update to the latest version for all tooling. The OpenTelemetry demo team
will attempt to keep the services in this repository up to date with the latest
Minimum required versions will be noted where possible, but it is recommended to
update to the latest version for all tooling. The OpenTelemetry demo team will
attempt to keep the services in this repository up to date with the latest
version for dependencies and tooling when possible.

## Generate Protobuf files
Expand Down
20 changes: 11 additions & 9 deletions content/en/docs/demo/docker-deployment.md
Expand Up @@ -7,7 +7,8 @@ aliases: [/docs/demo/docker_deployment]
## Prerequisites

- Docker
- [Docker Compose](https://docs.docker.com/compose/install/#install-compose) v2.0.0+
- [Docker Compose](https://docs.docker.com/compose/install/#install-compose)
v2.0.0+
- 5 GB of RAM

## Clone Repo
Expand All @@ -34,8 +35,9 @@ cd opentelemetry-demo/
docker compose up --no-build
```

> **Note:** If you're running on Apple Silicon, please run `docker compose
> build` in order to create local images vs. pulling them from the repository.
> **Note:** If you're running on Apple Silicon, please run
> `docker compose build` in order to create local images vs. pulling them from
> the repository.
**Note:** The `--no-build` flag is used to fetch released docker images from
[ghcr](https://ghcr.io/open-telemetry/demo) instead of building from source.
Expand All @@ -55,8 +57,8 @@ Once the images are built and containers are started you can access:
## Bring your own backend

Likely you want to use the Webstore as a demo application for an observability
backend you already have (e.g. an existing instance of Jaeger, Zipkin, or one
of the [vendor of your choice](/ecosystem/vendors/).
backend you already have (e.g. an existing instance of Jaeger, Zipkin, or one of
the [vendor of your choice](/ecosystem/vendors/).

OpenTelemetry Collector can be used to export telemetry data to multiple
backends. By default, the collector in the demo application will merge the
Expand All @@ -69,8 +71,8 @@ To add your backend, open the file
[src/otelcollector/otelcol-config-extras.yml](https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/otelcollector/otelcol-config-extras.yml)
with an editor.

- Start by adding a new exporter. For example, if your backend supports
OTLP over HTTP, add the following:
- Start by adding a new exporter. For example, if your backend supports OTLP
over HTTP, add the following:

```yaml
exporters:
Expand All @@ -95,5 +97,5 @@ different exporters, you may find them and their documentation available at
[opentelemetry-collector-contrib/exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter).

After updating the `otelcol-config-extras.yml`, start the demo by running
`docker compose up`. After a while, you should see the traces flowing into
your backend as well.
`docker compose up`. After a while, you should see the traces flowing into your
backend as well.
6 changes: 3 additions & 3 deletions content/en/docs/demo/feature-flags.md
Expand Up @@ -5,11 +5,11 @@ aliases: [/docs/demo/feature_flags]

This demo comes with several feature flags which can control failure conditions
in specific services. By default the flags are disabled. Using the Feature Flags
UI <http://localhost:8080/feature> you will be able to control the status of these
feature flags.
UI <http://localhost:8080/feature> you will be able to control the status of
these feature flags.

| Feature Flag | Service(s) | Description |
|-------------------------|-----------------|----------------------------------------------------------------------------------------------------------|
| ----------------------- | --------------- | -------------------------------------------------------------------------------------------------------- |
| `adServiceFailure` | Ad Service | Generate an error for `GetAds` 1/10th of the time |
| `productCatalogFailure` | Product Catalog | Generate an error for `GetProduct` requests with product id: `OLJCESPC7Z` |
| `recommendationCache` | Recommendation | Create a memory leak due to an exponentially growing cache. 1.4x growth, 50% of requests trigger growth. |
19 changes: 10 additions & 9 deletions content/en/docs/demo/features.md
Expand Up @@ -10,18 +10,18 @@ aliases: [/docs/demo/demo_features]
only with Docker.
- **[gRPC](https://grpc.io)**: microservices use a high volume of gRPC calls to
communicate to each other.
- **[HTTP](https://www.rfc-editor.org/rfc/rfc9110.html)**: microservices use HTTP
where gRPC is unavailable or not well supported.
- **[HTTP](https://www.rfc-editor.org/rfc/rfc9110.html)**: microservices use
HTTP where gRPC is unavailable or not well supported.
- **[OpenTelemetry Traces](https://opentelemetry.io)**: all services are
instrumented using OpenTelemetry available instrumentation libraries.
- **[OpenTelemetry Metrics](https://opentelemetry.io)**: Select services are
instrumented using OpenTelemetry available instrumentation libraries. More will
be added as the relevant SDKs are released.
- **[OpenTelemetry
Collector](/docs/collector/getting-started)**: all
services are instrumented and sending the generated traces and metrics to the
instrumented using OpenTelemetry available instrumentation libraries. More
will be added as the relevant SDKs are released.
- **[OpenTelemetry Collector](/docs/collector/getting-started)**: all services
are instrumented and sending the generated traces and metrics to the
OpenTelemetry Collector via gRPC. The received traces are then exported to the
logs and to Jaeger; received metrics and exemplars* are exported to logs and Prometheus.
logs and to Jaeger; received metrics and exemplars\* are exported to logs and
Prometheus.
- **[Jaeger](https://www.jaegertracing.io)**: all generated traces are being
sent to Jaeger.
- **Synthetic Load Generation**: the application demo comes with a background
Expand All @@ -36,5 +36,6 @@ be added as the relevant SDKs are released.
flag service.

_\*Only exemplars attached to histograms are currently exported to Prometheus.
See [issue in the collector](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/18201)
See
[issue in the collector](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/18201)
for details._

0 comments on commit f9cb26f

Please sign in to comment.