Skip to content

perf(observability): implement smart logging sampling and event-type …#7

Merged
AlpNuhoglu merged 1 commit into
mainfrom
perf/matchmaking-presence-io-batching
Jun 23, 2026
Merged

perf(observability): implement smart logging sampling and event-type …#7
AlpNuhoglu merged 1 commit into
mainfrom
perf/matchmaking-presence-io-batching

Conversation

@AlpNuhoglu

Copy link
Copy Markdown
Owner

…span tracing

  • Added unified observability config parameters for logging and tracing thresholds.
  • Optimized HTTP middleware to pre-allocate zap.Field slices with exact capacity, eliminating per-request heap reallocations.
  • Implemented a custom sampledCore wrapper for Zap to sample fast/successful 2xx Info logs while bypassing errors/warns/slow requests.
  • Introduced event-type span sampling using TraceIDRatioBased sampler for high-volume events like LeaderboardUpdated, dropping exporter overhead by ~99% while fully preserving Context Propagation.

…span tracing

- Added unified observability config parameters for logging and tracing thresholds.
- Optimized HTTP middleware to pre-allocate zap.Field slices with exact capacity, eliminating per-request heap reallocations.
- Implemented a custom `sampledCore` wrapper for Zap to sample fast/successful 2xx Info logs while bypassing errors/warns/slow requests.
- Introduced event-type span sampling using TraceIDRatioBased sampler for high-volume events like LeaderboardUpdated, dropping exporter overhead by ~99% while fully preserving Context Propagation.
@AlpNuhoglu AlpNuhoglu merged commit 4ef5e0a into main Jun 23, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant