Skip to content

Commit 4510f37

Browse files
committed
added way to run in makefile
Signed-off-by: Harshil Gupta <[email protected]>
1 parent 3083ed1 commit 4510f37

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

docker-compose/monitor/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,9 @@ clean-all: clean-jaeger
5050
docker rmi -f jaegertracing/all-in-one:latest ; \
5151
docker rmi -f otel/opentelemetry-collector-contrib:latest ; \
5252
docker rmi -f prom/prometheus:latest ; \
53+
54+
.PHONY: metrics-tags-filtering
55+
metrics-tags-filtering: export JAEGER_VERSION = dev
56+
metrics-tags-filtering:
57+
@echo "Running Jaeger with metrics tags filtering enabled..."
58+
docker compose -f docker-compose-tag-filtering.yml up $(DOCKER_COMPOSE_ARGS)

docker-compose/monitor/TAG_FILTERING.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,18 @@ processors:
4848
from_attribute: env
4949
```
5050
51-
## Example Usage
52-
53-
To test tag filtering:
54-
55-
1. Start Jaeger with this configuration
56-
2. Send traces with tags as resource attributes
57-
3. Query metrics with tag filters using the Jaeger UI or API
58-
59-
Example API query:
60-
```
61-
http://localhost:16686/api/metrics/calls?service=my-service&tag=tag1:value1
62-
```
63-
6451
## Testing with Docker Compose
6552
6653
To test tag filtering in the Docker Compose environment:
67-
1. Start the docker compose file for tag filtering [docker-compose-tag-filtering.yml](./docker-compose-tag-filtering.yml)
54+
1. Start the docker compose file for tag filtering [docker-compose-tag-filtering.yml](./docker-compose-tag-filtering.yml) using MakeFile. Run
55+
```
56+
make build
57+
make metrics-tags-filtering
58+
```
6859
2. This will start jaeger, prometheus, and two trace generator which generate traces from staging and production envs.
6960
3. **Query metrics with tag filters**: Use the metrics API with tag filter parameters
7061
```bash
71-
curl "http://localhost:16686/api/metrics/errors?service=redis&endTs=1755599476047&lookback=300000&quantile=0.95&ratePer=600000&spanKind=server&step=60000&tag=env:staging" | jq
62+
curl "http://localhost:16686/api/metrics/errors?service=redis&lookback=300000&quantile=0.95&ratePer=600000&spanKind=server&step=60000&tag=env:staging" | jq
7263
```
7364

7465
## Debugging Tips

scripts/makefiles/Docker.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ create-fake-debugimg: prepare-docker-buildx
3737
prepare-docker-buildx:
3838
@echo "::group:: prepare-docker-buildx"
3939
docker buildx inspect jaeger-build > /dev/null || docker buildx create --use --name=jaeger-build --buildkitd-flags="--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host" --driver-opt="network=host"
40-
docker inspect registry > /dev/null || docker run --rm -d -p $DOCKER_REGISTRY_PORT:5000 --name registry registry:2
40+
docker inspect registry > /dev/null || docker run --rm -d -p $(DOCKER_REGISTRY_PORT):5000 --name registry registry:2
4141
@echo "::endgroup::"
4242

4343
.PHONY: clean-docker-buildx

0 commit comments

Comments
 (0)