fleet/server/contexts/ctxerr
Victor Lyuboslavsky 07949df530
Improved OpenTelemetry error handling (#38757)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #38756 

- Changed to NOT mark many client errors as exceptions
- Instead, added client_error and server_error metrics that can be used
to alert on unusual error rates

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added separate metrics for distinguishing between client and server
errors, enhancing observability and monitoring capabilities.

* **Bug Fixes**
* Client request errors no longer incorrectly appear in error tracking
as exceptions; improved accuracy of error reporting to external
services.
* Adjusted logging levels for authentication and enrollment operations
to provide clearer diagnostics.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-26 17:07:32 -06:00
..
ctxerr.go Improved OpenTelemetry error handling (#38757) 2026-01-26 17:07:32 -06:00
ctxerr_otel_test.go Refactor endpoint_utils for modularization (#36484) 2025-12-31 09:12:00 -06:00
ctxerr_test.go Improved OpenTelemetry error handling (#38757) 2026-01-26 17:07:32 -06:00
metadata.go Refactor endpoint_utils for modularization (#36484) 2025-12-31 09:12:00 -06:00
metrics.go Improved OpenTelemetry error handling (#38757) 2026-01-26 17:07:32 -06:00
stack.go implement a thin wrapper around stdlib errors (#5733) 2022-05-18 11:47:55 -03:00
stack_test.go Update to Go 1.24.1 (#27506) 2025-03-31 11:14:09 -05:00
statistics.go Refactor endpoint_utils for modularization (#36484) 2025-12-31 09:12:00 -06:00
statistics_test.go Adding telemetry for specific Fleet Desktop errors (#23349) 2024-10-31 14:24:42 -05:00