forked from stefanprodan/podinfo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a new otel directory; Add a readme and makefile
- Loading branch information
Showing
4 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
DC=docker-compose -f docker-compose.yaml | ||
|
||
.PHONY: help | ||
.DEFAULT_GOAL := help | ||
|
||
help: | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
stop: ## Stop all Docker Containers run in Compose | ||
$(DC) stop | ||
|
||
clean: stop ## Clean all Docker Containers and Volumes | ||
$(DC) down --rmi local --remove-orphans -v | ||
$(DC) rm -f -v | ||
|
||
build: clean ## Rebuild the Docker Image for use by Compose | ||
$(DC) build | ||
|
||
run: stop ## Run the Application | ||
$(DC) up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Tracing Demo | ||
|
||
The directory contains sample [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) | ||
and [Jaeger](https://www.jaegertracing.io) configurations for a tracing demo. | ||
|
||
## Configuration | ||
|
||
The provided [docker-compose.yaml](docker-compose.yaml) sets up 4 Containers | ||
|
||
1. PodInfo Frontend on port 9898 | ||
2. PodInfo Backend on port 9899 | ||
3. OpenTelemetry Collector listening on port 4317 for GRPC | ||
4. Jaeger all-in-one listening on multiple ports | ||
|
||
## How does it work? | ||
|
||
The frontend pods are configured to call onto the backend pods. Both the podinfo | ||
pods are configured to send traces over to the collector at port 4317 using GRPC. | ||
The collector forwards all received spans to Jaeger over port 14250 and Jaeger | ||
exposes a UI over port `16686`. | ||
|
||
## Running it locally | ||
|
||
1. Start all the Containers | ||
```shell | ||
make run | ||
``` | ||
2. Send some sample requests | ||
```shell | ||
curl -v http://localhost:9898/status/200 | ||
curl -X POST -v http://localhost:9898/api/echo | ||
``` | ||
3. Visit `http://localhost:16686/` to see the spans | ||
4. Stop all the containers | ||
```shell | ||
make stop | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.