-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstart-otel-test.sh
More file actions
executable file
Β·59 lines (51 loc) Β· 1.74 KB
/
start-otel-test.sh
File metadata and controls
executable file
Β·59 lines (51 loc) Β· 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
echo -e "${BLUE}π³ Starting Symfony OpenTelemetry Bundle Test Environment${NC}"
echo ""
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo -e "${RED}β Docker is not running. Please start Docker first.${NC}"
exit 1
fi
# Check if docker-compose is available
if ! command -v docker-compose > /dev/null 2>&1; then
echo -e "${RED}β docker-compose is not available. Please install Docker Compose.${NC}"
exit 1
fi
echo -e "${YELLOW}π¦ Building and starting services...${NC}"
docker-compose up -d --build
# Wait for services to start
echo ""
echo -e "${YELLOW}β³ Waiting for services to start...${NC}"
sleep 10
# Check service status
echo ""
echo -e "${BLUE}π Service Status:${NC}"
docker-compose ps
echo ""
echo -e "${GREEN}β
Environment started successfully!${NC}"
echo ""
echo -e "${BLUE}π Access Points:${NC}"
echo -e " π± Test Application: ${GREEN}http://localhost:8080${NC}"
echo -e " π Grafana Dashboard: ${GREEN}http://localhost:3000${NC} (admin/admin)"
echo -e " π Tempo API: ${GREEN}http://localhost:3200${NC}"
echo ""
echo -e "${BLUE}π§ͺ Quick Test Commands:${NC}"
echo -e " curl http://localhost:8080/api/test"
echo -e " curl http://localhost:8080/api/slow"
echo -e " curl http://localhost:8080/api/nested"
echo -e " curl http://localhost:8080/api/error"
echo ""
echo -e "${YELLOW}π To view traces:${NC}"
echo -e " 1. Open Grafana: http://localhost:3000"
echo -e " 2. Navigate to Explore β Tempo"
echo -e " 3. Search for traces from 'symfony-otel-test' service"
echo ""
echo -e "${BLUE}π To stop the environment:${NC}"
echo -e " docker-compose down"
echo ""