94 lines
12 KiB
Plaintext
94 lines
12 KiB
Plaintext
# Logging & Monitoring Audit - 20251123-104219
|
|
== Logging Libraries Used ==
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:9: "log"
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:166: log.Fatal("Database configuration missing: DB_HOST, DB_USER, DB_PASSWORD, DB_NAME required")
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:176: log.Fatalf("Invalid DB_SCHEMA '%s'. Must be: dev, testing, prod, or empty for public", dbSchema)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:186: log.Fatal(err)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:196: log.Fatal(err)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:203: log.Printf("Connected to database (SSL mode: %s, schema: %s, max_conns: 25)", dbSSLMode, schemaInfo)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:260: log.Fatal("Failed to create tables:", err)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:263: log.Println("Database tables initialized")
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:269: log.Fatal("JWT_SECRET must be set and at least 32 characters")
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:535: log.Println("Database error:", err)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:550: log.Println("Scan error:", err)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:562: log.Println("Rows error:", err)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:671: log.Println("Database error:", err)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:683: log.Printf("AUDIT: User %d created question %d", userID, q.ID)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:727: log.Printf("AUDIT: User %d updated question %d", userID, id)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:764: log.Printf("AUDIT: User %d deleted question %d", userID, id)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:832: log.Printf("AUDIT: User %d answered question %d", userID, questionID)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:876: log.Printf("AUDIT: User %d updated answer %d", userID, id)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:916: log.Printf("AUDIT: User %d deleted answer %d", userID, id)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:962: log.Printf("AUDIT: User %d accepted answer %d for question %d", userID, id, questionID)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:987: log.Printf("AUDIT: Admin %d verified answer %d", userID, id)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1120: log.Printf("AUDIT: Admin %d closed question %d", userID, id)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1242: log.Printf("SECURITY: Read rate limit exceeded for IP %s on %s", clientIP, r.URL.Path)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1248: log.Printf("SECURITY: Write rate limit exceeded for IP %s on %s", clientIP, r.URL.Path)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1273: log.Println("Forum Service shutting down...")
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1280: log.Printf("Could not gracefully shutdown: %v", err)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1285: log.Printf("Forum service starting on port %s\n", port)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1287: log.Fatalf("Server error: %v", err)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1291: log.Println("Forum Service stopped")
|
|
/home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:10: "log"
|
|
|
|
== Health Check Endpoints ==
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1018: // Check if user already voted
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1072: // Check if user already voted
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1225: // Health check
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1226: http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1278: server.SetKeepAlivesEnabled(false)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/payment-service/main_test.go:9:func TestHealthCheck(t *testing.T) {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/payment-service/main_test.go:10: req, err := http.NewRequest("GET", "/healthz", nil)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:116: // Health check (public)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:117: http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:573: http.Error(w, "Invoice number already exists", http.StatusConflict)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main_test.go:9:func TestHealthCheck(t *testing.T) {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main_test.go:10: req, err := http.NewRequest("GET", "/healthz", nil)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main.go:176: // Health check (public)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main.go:177: http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main.go:203: server.SetKeepAlivesEnabled(false)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main.go:1213: http.Error(w, "Work order number already exists", http.StatusConflict)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main.go:1263: http.Error(w, "Work order number already exists", http.StatusConflict)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main.go:1474: http.Error(w, "Cannot cancel a request that has already been processed", http.StatusBadRequest)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:39: accessTokenExpiry = 15 * time.Minute // Short-lived access tokens
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:369: // Health check
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:370: http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:396: server.SetKeepAlivesEnabled(false)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:641: http.Error(w, "Email already registered", http.StatusConflict)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:775: http.Error(w, "Blockchain address already registered", http.StatusConflict)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:1101: http.Error(w, "Identity already linked", http.StatusConflict)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:1126: http.Error(w, "Identity already linked", http.StatusConflict)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:1370:// generateAccessToken creates a short-lived JWT access token
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:1878: // Check if user already has this role
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:1886: http.Error(w, fmt.Sprintf("User already has %s role", req.Role), http.StatusConflict)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:1964: // Check if user already has SUPERUSER role
|
|
/home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:1972: http.Error(w, "User is already a SUPERUSER", http.StatusConflict)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/example-function/main.go:50: http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:33:// HealthResponse for health check
|
|
/home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:34:type HealthResponse struct {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:54: mux.HandleFunc("/health", healthHandler)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:143:func healthHandler(w http.ResponseWriter, r *http.Request) {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:144: response := HealthResponse{
|
|
/home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:145: Status: "healthy",
|
|
/home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:91: StatusApproved = "APPROVED" // Approved by admin, ready to publish
|
|
/home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:287: // Ignore errors for columns that already exist
|
|
/home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:288: if !strings.Contains(err.Error(), "already exists") {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:774: respondError(w, http.StatusConflict, "Blog with this slug already exists")
|
|
/home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1242: respondError(w, http.StatusConflict, "A community blog with this slug already exists")
|
|
/home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1454: respondError(w, http.StatusBadRequest, "This blog is already a site blog")
|
|
/home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1555: respondError(w, http.StatusBadRequest, "This is not a community blog (SITE blogs are already verified by default)")
|
|
/home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1560: respondError(w, http.StatusBadRequest, "This community blog is already verified")
|
|
/home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1841: // Health check
|
|
/home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1842: http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1895: server.SetKeepAlivesEnabled(false)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/contact-service/main.go:134: mux.HandleFunc("/health", corsMiddleware(healthHandler))
|
|
/home/administrator/projects/coppertone.tech/backend/functions/contact-service/main.go:177: server.SetKeepAlivesEnabled(false)
|
|
/home/administrator/projects/coppertone.tech/backend/functions/contact-service/main.go:399:func healthHandler(w http.ResponseWriter, r *http.Request) {
|
|
/home/administrator/projects/coppertone.tech/backend/functions/contact-service/main.go:401: json.NewEncoder(w).Encode(map[string]string{"status": "healthy"})
|
|
|
|
== Metrics Endpoints ==
|
|
/home/administrator/projects/coppertone.tech/frontend/node_modules/.pnpm/chrome-launcher@0.15.2/node_modules/chrome-launcher/.github/workflows/lh-smoke.yml:41: run: yarn --cwd node_modules/lighthouse/ smoke --debug -j=2 --retries=0 --shard=${{ matrix.smoke-test-shard }}/2 dbw oopif offline lantern metrics
|
|
|
|
== Tracing Implementation ==
|
|
/home/administrator/projects/coppertone.tech/.gopath/pkg/mod/golang.org/x/crypto@v0.30.0/internal/testenv/testenv_unix.go:14:// Send SIGQUIT to get a stack trace.
|