Skip to content

Commit ac56ea4

Browse files
committed
[SP-2993] chore: final adjustments
1 parent 4a1ce08 commit ac56ea4

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
.PHONY: help test lint fmt build clean run
2-
.DEFAULT_GOAL := help
3-
41
# Version management
52
VERSION ?= $(shell git tag --sort=-version:refname | head -n 1)
63
ifeq ($(VERSION),)
@@ -11,8 +8,15 @@ endif
118
LDFLAGS := -w -s -X github.com/scanoss/folder-hashing-api/internal/domain/entities.AppVersion=$(VERSION)
129
BUILD_DIR := ./target
1310

14-
help: ## Show this help message
15-
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
11+
# HELP
12+
# This will output the help for each task
13+
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
14+
.PHONY: help
15+
16+
help: ## This help
17+
@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
18+
19+
.DEFAULT_GOAL := help
1620

1721
# Development
1822
run: ## Run the API locally

internal/domain/entities/metrics.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package entities
22

33
import (
4+
"log"
5+
46
"go.opentelemetry.io/otel"
57
"go.opentelemetry.io/otel/metric"
68
)
@@ -19,6 +21,6 @@ func SetupMetrics() {
1921
oltpMetrics.hfhScanHistogram, err = meter.Int64Histogram("hfh.scan.req_time", metric.WithDescription("The time taken to run a hfh scan request (ms)"))
2022
if err != nil {
2123
// Log error but don't fail - metrics are non-critical
22-
_ = err
24+
log.Printf("failed to create hfh.scan.req_time histogram: %v", err)
2325
}
2426
}

0 commit comments

Comments
 (0)