Skip to content

Commit

Permalink
Merge pull request #71 from MapColonies/how-to-work-manualy
Browse files Browse the repository at this point in the history
docs: 'How to deploy Grafana' manual
  • Loading branch information
RonitKissis authored Jul 17, 2024
2 parents 1d06cff + 5b7a6fe commit d1b779c
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,5 @@ reports
# dev utils
.tsimp

# doc utils
docs

# semanticConventions
src/semanticConventions/**/*.ts
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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](./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
Expand Down
53 changes: 53 additions & 0 deletions docs/localManual.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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:8080'
```
- Docker internal network IP that is static: `172.17.0.1`
- The port your service is running on: `8080`

**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.

# Happy observability adventure! 😊

0 comments on commit d1b779c

Please sign in to comment.