File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1- .PHONY : help test lint fmt build clean run
2- .DEFAULT_GOAL := help
3-
41# Version management
52VERSION ?= $(shell git tag --sort=-version:refname | head -n 1)
63ifeq ($(VERSION ) ,)
118LDFLAGS := -w -s -X github.com/scanoss/folder-hashing-api/internal/domain/entities.AppVersion=$(VERSION )
129BUILD_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
1822run : # # Run the API locally
Original file line number Diff line number Diff line change 11package entities
22
33import (
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}
You can’t perform that action at this time.
0 commit comments