Commit Graph
87 Commits
Author SHA1 Message Date
ask 796b2a8412 tracing: enable retrying otlp requests when using http 2025-07-27 17:13:06 -07:00
ask 6a3bc7bab3 feat(logger): add buffering exporter with TLS support for OTLP logs
Add buffering exporter to queue OTLP logs until tracing is configured.
Support TLS configuration for OpenTelemetry log export with client
certificate authentication. Improve logfmt formatting and tracing setup.
2025-07-27 16:36:18 -07:00
ask da13a371b4 feat(database): add shared transaction helpers
Add transaction base utilities with Begin, Commit, and Rollback
functions supporting both sql.DB and sql.Tx interfaces.
2025-07-12 23:52:48 -07:00
ask a1a5a6b8be database: create shared database package
Extract common database functionality from api/ntpdb and monitor/ntpdb
into shared common/database package:

- Dynamic connector pattern with configuration loading
- Configurable connection pool management (API: 25/10, Monitor: 10/5)
- Optional Prometheus metrics integration
- Generic transaction helpers with proper error handling
- Unified interfaces compatible with SQLC-generated code

Foundation for migration to eliminate ~200 lines of duplicate code.
2025-07-12 17:59:28 -07:00
ask 96afb77844 database: create shared database package with configurable patterns
Extract ~200 lines of duplicate database connection code from api/ntpdb/
and monitor/ntpdb/ into common/database/ package. Creates foundation for
database consolidation while maintaining zero breaking changes.

Files added:
- config.go: Unified configuration with package-specific defaults
- connector.go: Dynamic connector pattern from Boostport
- pool.go: Configurable connection pool management
- metrics.go: Optional Prometheus metrics integration
- interfaces.go: Shared database interfaces for consistent patterns

Key features:
- Configuration-driven approach (API: 25/10 connections + metrics,
  Monitor: 10/5 connections, no metrics)
- Optional Prometheus metrics when registerer provided
- Backward compatibility via convenience functions
- Flexible config file loading (explicit paths + search-based)

Dependencies: Added mysql driver and yaml parsing for database configuration.
2025-07-12 16:54:24 -07:00
ask c372d79d1d build: goreleaser 2.11.0 and download script tweaks 2025-07-12 16:51:10 -07:00
ask b5141d6a70 Add database transaction helpers 2025-07-12 13:57:27 -07:00
ask 694f8ba1d3 Add comprehensive godoc documentation to all packages
- Add package-level documentation with usage examples and architecture details
- Document all public types, functions, and methods following godoc conventions
- Remove unused logger.Error type and NewError function
- Apply consistent documentation style across all packages

Packages updated:
- apitls: TLS certificate management with automatic renewal
- config: Environment-based configuration system
- config/depenv: Deployment environment handling
- ekko: Enhanced Echo web framework wrapper
- kafka: Kafka client wrapper with TLS support
- logger: Structured logging with OpenTelemetry integration
- tracing: OpenTelemetry distributed tracing setup
- types: Shared data structures for NTP Pool project
- xff/fastlyxff: Fastly CDN IP range management

All tests pass after documentation changes.
2025-06-19 23:52:03 -07:00
ask 09b52f92d7 version: add documentation and tests 2025-06-06 20:19:08 -07:00
ask 785abdec8d ulid: simplify, add function without a timestamp 2025-06-06 20:02:23 -07:00
ask ce203a4618 Add README 2025-06-06 19:56:43 -07:00
ask 3c994a7343 Add copilot/claude instructions 2025-06-06 19:50:30 -07:00
ask f69c3e9c3c ulid: add documentation and more tests 2025-06-06 19:31:28 -07:00
ask fac5b1f275 metrics: add tests and documentation 2025-06-06 19:24:30 -07:00
ask a37559b93e health: add documentation 2025-06-06 19:16:14 -07:00
ask faac09ac0c timeutil: Add documentation 2025-06-06 19:08:16 -07:00
ask 62a7605869 config: add depenv.MonitorDomain() and config.ManageURL() methods 2025-04-19 23:07:08 -07:00
ask 0996167865 modernize + gofumpt 2025-04-19 22:19:02 -07:00
ask 87344dd601 version: KongVersionCmd type 2025-04-12 00:24:19 -07:00
ask 39e6611602 build: update goreleaser 2025-04-12 00:23:33 -07:00
ask 355d246010 depenv: implement UnmarshalText 2025-04-12 00:22:57 -07:00
ask e5836a8b97 depenv: ntppool configuration for deployment environments 2025-01-26 11:08:44 -08:00
ask f6d160a7f8 health: fix shutdown of health check server 2025-01-03 14:01:52 +01:00
ask 9e2d6fb74e Update dependencies 2024-12-27 18:39:48 -08:00
ask 0df1154bb5 Update goreleaser to 2.5.0 2024-12-21 08:55:17 -08:00
ask b926a85737 ekko: gzip config option 2024-12-01 16:45:49 -08:00
ask 68bd4d8904 ekko: configurable read write and readheader timeouts 2024-11-26 01:04:34 -08:00
ask 152be9d956 logger: otlp support 2024-11-09 10:59:11 +00:00
ask ab94adb925 tracing: setup log provider 2024-11-09 10:19:16 +00:00
ask ddb56b3566 ekko: Add WithLogFilters option 2024-10-12 11:39:16 -07:00
ask 4367ef9c29 Add Fatalf to standard logger-ish 2024-10-12 11:11:50 -07:00
ask d6a77f4003 ekko: add gzip, move recover middleware to run early 2024-09-21 00:53:10 -07:00
ask 3f3fb29bc9 ekko: helper to setup labstack echo with logging, tracing, etc 2024-09-20 21:47:10 -07:00
ask 8e898d9c59 tracing: refactor code, support more exporters with default environment configuration 2024-09-14 00:47:07 -07:00
ask 1ecd5684e6 version: Add CheckVersion() function 2024-08-18 18:11:17 -07:00
ask 59580b50ba scripts: update goreleaser 2024-07-07 13:05:06 -07:00
ask 9a86b2aaf5 tracing: semconv v1.26.0 2024-07-06 13:04:48 -07:00
ask bcf7232154 Update dependencies + otel schema 1.25 2024-06-08 00:14:42 -07:00
ask 9934dc8e36 Update Go, slog-otel, prometheus client 2024-04-06 09:42:41 -07:00
ask a458dcb226 tracing: add EndpointURL option 2024-03-16 10:40:43 -07:00
ask 4ed44c72a4 Update dependencies 2024-03-09 21:57:46 -08:00
ask 8a8ff93996 scripts: goreleaser 1.24.0 2024-02-10 19:10:01 -08:00
ask 1e8785bd32 version: fix metric name for services with dash in the name 2024-02-03 00:21:31 -08:00
ask 5aeaa97c6f Add BSD license
(for pkg.go.dev)
2024-01-20 11:48:32 -07:00
ask df2285d355 tracing: update semconv, better error checking 2024-01-19 22:59:29 -08:00
ask 232a6f98df tracing: add minimal test 2024-01-19 22:48:14 -08:00
ask 4f6b09200f Update dependencies 2024-01-12 23:12:15 -08:00
ask 7085202154 Update goreleaser 2024-01-12 22:17:07 -08:00
ask 5c7ae6ab8a Basic config package to parse NTP Pool system config 2023-12-10 20:43:38 -08:00
ask 608f05d395 types: shared data types 2023-12-10 19:16:13 -08:00
ask b5420f9dbd build: private repository support for drone / goreleaser 2023-12-10 19:15:49 -08:00
ask 537ee53384 Minor dependency updates 2023-11-26 01:15:04 -08:00
ask 0a92ad768e tracing: option to set endpoint without environment variables 2023-11-15 22:29:20 +08:00
ask 61d73f7be3 Update dependencies 2023-11-15 22:28:41 +08:00
ask 2bff6d8ef3 X-Forwarded-For handler for labstack echo and Fastly 2023-11-12 15:51:21 -08:00
ask 62e28b71f1 tracing: option to use a GetClientCertificates function 2023-10-29 18:18:41 -07:00
ask 5b033a1f0b logging: use remychantenay/slog-otel 2023-10-21 22:09:48 -07:00
ask a4447c97f6 tracing: support for shutting down the trace provider 2023-10-21 21:59:10 -07:00
ask 9d136b2502 logger: Add experimental support for adding trace_id from context 2023-10-21 21:51:29 -07:00
ask 7420ad12f4 Update dependencies 2023-10-21 21:49:51 -07:00
ask cf33a99566 tracing: tweak API 2023-10-14 04:20:29 -07:00
ask c2b303bec9 goreleaser: --skip-publish is now --skip=publish 2023-10-14 04:10:33 -07:00
ask 6fd0728668 Update kafka-go 2023-10-14 03:31:30 -07:00
ask 09f963b267 tracing: wip / test 2023-10-14 03:30:19 -07:00
ask ad63071f60 Update dependencies and goreleaser; require Go 1.21.3 for h2 fix 2023-10-11 22:03:38 -07:00
ask 020966a4b3 Go 1.21; use log/slog instead of version from x/exp 2023-09-17 23:03:55 -07:00
ask 053de4fd16 scripts: manage goreleaser version in script 2023-09-17 23:02:48 -07:00
ask 3f1f4436df metrics: have Registry() return a Registry instead of Registerer
(so it can also be used as a Gatherer)
2023-08-06 12:34:56 -07:00
ask be9b63f382 health: support custom health check functions 2023-07-22 23:48:04 -07:00
ask e9d0f7419a kafka: CheckPartitions() method for health checks 2023-07-22 23:47:37 -07:00
ask 2a021b453d timeutil: time.Duration json helper 2023-07-22 00:10:55 -07:00
ask 03bde25c6d health: make health listener semantics match metrics one 2023-07-08 21:18:38 -07:00
ask 6b6b22092e metrics: allow server to return errors 2023-07-08 21:13:31 -07:00
ask facd2f4f57 Common release scripts 2023-07-08 17:39:36 -07:00
ask 5c067e3752 version: Prefix build_info metric name 2023-07-08 15:56:57 -07:00
ask 7550d1597c version: add more data to prometheus metric 2023-07-08 15:04:43 -07:00
ask cca1240a65 version: change prom metric to have separate label with build time 2023-07-08 13:09:37 -07:00
ask 7ad495fe2b kafka: switch to lz4 compression; disable default logger on writer 2023-07-08 13:08:52 -07:00
ask 3ba8ba4a22 Add ulid package 2023-07-08 12:49:14 -07:00
ask ebd0695862 Add version package 2023-07-08 12:32:49 -07:00
ask a1e600e8ae metricsserver: add helper for exporting prom metrics
(also from the monitor code)
2023-07-08 11:45:01 -07:00
ask ab579128b9 health: basic health checker from the monitor 2023-07-02 23:49:05 -07:00
ask bb99ca5843 kafka: Add reader helper 2023-07-02 23:22:58 -07:00
ask 57cfb90777 Kafka helper (from chgw) 2023-07-02 23:06:13 -07:00
ask fb5e781e94 apitls helper 2023-07-01 20:13:24 -07:00
ask cc6a6c0320 Add common logger helper 2023-07-01 19:57:36 -07:00
ask cf61f70d95 Start repository 2023-07-01 18:44:13 -07:00