go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.28k stars 194 forks source link

Add http end point observer #755

Closed gdey closed 3 years ago

gdey commented 3 years ago

[observability] Split out httpAPI and httpViewer instrumentation

Split out the Observability interface so that API route and dealt with separately from the viewer routes.

Moved Null Observer to an internal package, treating nil as a Null Observer. Prometheus observer can be configured to indicate which API vars should be filled in. Default variables are :map_name, :layer_name and :z.

fixes #754

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 835b326f3-PR-755


Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/tegola/cmd/cache/cache.go 0 1 0.0%
cmd/tegola/cmd/server.go 0 1 0.0%
cmd/tegola/cmd/cache/seed_purge.go 0 2 0.0%
maths/maths.go 0 3 0.0%
atlas/atlas.go 0 8 0.0%
server/server.go 5 13 38.46%
<!-- Total: 9 32 28.13% -->
Files with Coverage Reduction New Missed Lines %
maths/maths.go 1 30.87%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 671145575: -0.04%
Covered Lines: 5413
Relevant Lines: 11882

💛 - Coveralls
ARolek commented 3 years ago

@gdey could you add a section to the http package README.md called something like "Prometheus Metrics" and explain the metrics that are available from this package