From 51b0a5ee0d054aeab3b5561d3b5056e907c7ef87 Mon Sep 17 00:00:00 2001 From: RonitKissis Date: Tue, 16 Jul 2024 13:39:53 +0300 Subject: [PATCH 1/4] feat: local manual for local grafana deployment --- README.md | 2 ++ localManual.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 localManual.md diff --git a/README.md b/README.md index 9d2e8fd..5a3f35f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Telemetry ## Motive This package goal is to make the experience of configuring and working with OpenTelemetry easier. + +### [Manual for easy local grafana deployment](./localManual.md) ## example Below are short examples for tracing and metrics. More examples are available at the [examples folder](examples/), and the various opentelemetry repos. ### Tracing diff --git a/localManual.md b/localManual.md new file mode 100644 index 0000000..9d1371e --- /dev/null +++ b/localManual.md @@ -0,0 +1,51 @@ +# Local Grafana Deployment + +## Motive + +When adding metrics, tracing, and logs to our services, we aim to deploy the Grafana stack locally to facilitate easier development and testing. This manual provides the steps necessary to achieve that. + +## Let's Get Started + +You will run the Grafana stack using `docker-compose`. This manual includes some modifications to the original Grafana setup to enable comprehensive telemetry collection. + +> **Note:** +> Don't run the `docker-compose` command yet; we are making some changes first. + +[Link to Grafana official manual on Tempo](https://grafana.com/docs/tempo/latest/getting-started/docker-example/) + +### 1. Clone the Repository + +As mentioned in the manual above, clone the repository to your local machine. + +### 2. Remove Fake Clients to Reduce Noise + +- Open the cloned repository and navigate to `tempo/example/docker-compose/local/docker-compose.yaml`. +- Remove the `k6-tracing` section to eliminate fake clients. + +**Don't forget to save.** + +### 3. Enable Prometheus Collector from Your Local App + +- Open the cloned repository and navigate to `tempo/example/docker-compose/shared/prometheus.yaml`. +- Add the following job according to the service you are running locally: + + ```yaml + - job_name: 'app' + static_configs: + - targets: + - '172.17.0.1:8081' + ``` + + - Docker internal network IP that is static: `172.17.0.1` + - The port your service is running on: `8081` + +**Don't forget to save.** + +These two simple steps enable the following: +1. Removal of fake clients from Tempo. +2. Configuration of Prometheus to collect metrics from your local app. + +Now you can run `docker-compose` from `tempo/example/docker-compose/local` and access Grafana at [localhost:3000](http://localhost:3000). + +Access Prometheus at [localhost:9090](http://localhost:9090), go to `Status -> Targets`, and you should see the job you created with the path provided in the endpoint. + From 22ab951f65a58fbe6ce0bb0f38c311bfdf03c773 Mon Sep 17 00:00:00 2001 From: RonitKissis Date: Tue, 16 Jul 2024 13:43:10 +0300 Subject: [PATCH 2/4] feat: add emoji --- localManual.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/localManual.md b/localManual.md index 9d1371e..f34796d 100644 --- a/localManual.md +++ b/localManual.md @@ -49,3 +49,5 @@ Now you can run `docker-compose` from `tempo/example/docker-compose/local` and a Access Prometheus at [localhost:9090](http://localhost:9090), go to `Status -> Targets`, and you should see the job you created with the path provided in the endpoint. +# Happy observability adventure! 😊 + From 3109455fec9f6ec4815b60c7a7269fffc6bca464 Mon Sep 17 00:00:00 2001 From: RonitKissis Date: Wed, 17 Jul 2024 09:55:32 +0300 Subject: [PATCH 3/4] fix: pr changes --- README.md | 2 +- localManual.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5a3f35f..30be6f8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Motive This package goal is to make the experience of configuring and working with OpenTelemetry easier. -### [Manual for easy local grafana deployment](./localManual.md) +## [Manual for easy local grafana deployment](./localManual.md) ## example Below are short examples for tracing and metrics. More examples are available at the [examples folder](examples/), and the various opentelemetry repos. ### Tracing diff --git a/localManual.md b/localManual.md index f34796d..c533d6d 100644 --- a/localManual.md +++ b/localManual.md @@ -33,11 +33,11 @@ As mentioned in the manual above, clone the repository to your local machine. - job_name: 'app' static_configs: - targets: - - '172.17.0.1:8081' + - '172.17.0.1:8080' ``` - Docker internal network IP that is static: `172.17.0.1` - - The port your service is running on: `8081` + - The port your service is running on: `8080` **Don't forget to save.** From 5b7a6fe8507e396e32058402d63459f7664fb395 Mon Sep 17 00:00:00 2001 From: RonitKissis Date: Wed, 17 Jul 2024 10:21:11 +0300 Subject: [PATCH 4/4] fix: moved manual to docs folder --- .gitignore | 3 --- README.md | 2 +- localManual.md => docs/localManual.md | 0 3 files changed, 1 insertion(+), 4 deletions(-) rename localManual.md => docs/localManual.md (100%) diff --git a/.gitignore b/.gitignore index f8db34f..8da3c6f 100644 --- a/.gitignore +++ b/.gitignore @@ -109,8 +109,5 @@ reports # dev utils .tsimp -# doc utils -docs - # semanticConventions src/semanticConventions/**/*.ts diff --git a/README.md b/README.md index 30be6f8..a434620 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Motive This package goal is to make the experience of configuring and working with OpenTelemetry easier. -## [Manual for easy local grafana deployment](./localManual.md) +## [Manual for easy local grafana deployment](./docs/localManual.md) ## example Below are short examples for tracing and metrics. More examples are available at the [examples folder](examples/), and the various opentelemetry repos. ### Tracing diff --git a/localManual.md b/docs/localManual.md similarity index 100% rename from localManual.md rename to docs/localManual.md