Conversation
Co-authored-by: Fantasy-programming <37631123+Fantasy-programming@users.noreply.github.com>
Co-authored-by: Fantasy-programming <37631123+Fantasy-programming@users.noreply.github.com>
Co-authored-by: Fantasy-programming <37631123+Fantasy-programming@users.noreply.github.com>
|
what about pgxotel ? |
|
… configurable Co-authored-by: Fantasy-programming <37631123+Fantasy-programming@users.noreply.github.com>
Implemented! I've replaced the custom database tracing implementation with the official
Implemented comprehensive enable/disable functionality! The telemetry features now fully respect the
Set Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
ok, now just add tracing, counters, meters, to all handlers on locations that matter |
Co-authored-by: Fantasy-programming <37631123+Fantasy-programming@users.noreply.github.com>
Done! Added comprehensive OpenTelemetry tracing, counters, and meters to all critical handlers: ✅ Instrumented Handlers:
✅ Metrics Implemented:
✅ Business Events Tracked:
✅ Configuration:
All handlers now have the tracing, counters, and meters you requested! Commit: be81bba Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
other configs should be relevant too (see below, they are in the config otlp and should be used so that for example, if we export to a provider that require api key it could work) ExporterOtlpHeaders |
…n, and temporality preferences Co-authored-by: Fantasy-programming <37631123+Fantasy-programming@users.noreply.github.com>
Implemented comprehensive support for all OTLP configuration options! Now supports: ✅ Headers: Cloud providers like Honeycomb, Grafana Cloud, and New Relic now work seamlessly with API key authentication. Includes comprehensive tests and updated documentation. Commit: 80faf25 |
This PR implements comprehensive observability for the nuts backend using OpenTelemetry distributed tracing and metrics collection with full enable/disable configuration control and support for major cloud observability providers.
Key Features
OpenTelemetry Integration
OTEL_ENABLED=true)Comprehensive Metrics
http_requests_totalcounter andhttp_request_duration_secondshistogram with method, handler, and status code labelserrors_totalcounter categorized by error type and handler for detailed error analysisbusiness_events_totalcounter tracking key application events with success/failure outcomesEnhanced Logging
trace_idandspan_idfor correlation with distributed traces when telemetry is enabledAdvanced OTLP Configuration
Cloud Provider Support
Works seamlessly with major observability platforms:
Configurable Telemetry
OTEL_ENABLED=falseto disable all tracing and metrics with zero performance impactExample Metrics Output
Configuration
Complete Configuration Options
Implementation Details
New Packages
server/pkg/telemetry: OpenTelemetry setup and configuration with metrics support and cloud provider integrationserver/pkg/logging: Enhanced logging with trace context supportserver/pkg/database: Database tracing utilities using otelpgxInstrumented Handlers
Enhanced Components
Testing & Documentation
docs/OBSERVABILITY.mdwith enable/disable instructions and cloud provider examples.env.telemetry.examplewith real-world cloud provider setupsBackward Compatibility
All changes are backward compatible and non-breaking:
OTEL_ENABLED=falseThis implementation provides a production-ready observability foundation with comprehensive metrics collection, full cloud provider support, and complete control over telemetry configuration while maintaining zero impact when disabled.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.