-
OPIK-2163: Add single tracing operations rate limiting (#2860)
发布于
2025-07-31 14:56:22 +00:00 - OPIK-2163: Add single tracing operations rate limiting
- Added singleTracingOps rate limit configuration to config.yml with 3 requests per second
- Applied @RateLimited annotation to createSpans and updateSpan methods in SpansResource
- Applied @RateLimited annotation to createTraces and updateTrace methods in TracesResource
- Added comprehensive E2E tests for singleTracingOps rate limiting functionality
- Tests verify rate limiting works correctly and doesn't interfere with other limits
- OPIK-2163: Extract singleTracingOps to constant
- Add SINGLE_TRACING_OPS constant to RateLimited annotation
- Update SpansResource and TracesResource to use constant instead of string literal
- Update test file to use annotation constant for consistency
- Ensures maintainability and reduces string duplication
- OPIK-2163: Fix and improve singleTracingOps rate limiting tests
- Fixed span and trace update tests with proper field handling
- Added comprehensive tests for singleTracingOps rate limiting on create operations
- Tests verify rate limiting works correctly and doesn't interfere with other limits
- 3 out of 4 new tests passing, proving core functionality works as designed
- OPIK-2163: Fix span update test by including parentSpanId
- Added missing parentSpanId field to SpanUpdate in rate limiting test
- Span updates now pass business validation correctly
- Test verifies rate limiting works perfectly with 204 -> 204 -> 204 -> 429 -> 429 -> 429 pattern
- All singleTracingOps rate limiting tests now passing successfully
- OPIK-2163: Fix singleTracingOps rate limiting tests
- Fix batch test to use batch endpoint for initial rate limit consumption
- Add callCreateSpan method to SpanResourceClient for individual span tests
- Update test status code expectations (201 for individual, 204 for batch)
- Fix update test logic to account for rate limit consumption by creation
Core singleTracingOps implementation working correctly:
- Individual endpoints (POST /spans, POST /traces, PATCH /spans/{id}, PATCH /traces/{id}) use singleTracingOps
- Batch endpoints (POST /spans/batch, POST /traces/batch) use general rate limiting
- Rate limiting isolation working as expected
-
OPIK-2163: Refactor rate limit tests to use client classes instead of direct HTTP calls
-
Fix asserts and typo
下载附件