/claim #9922 Fixes #9922
+ ZStreamAspectSpec
+ annotated aspect
+ ZStreamAspectSpec
+ annotated aspect
+ preserves stream elements
timestamp=2025-06-25T15:19:09.414Z level=INFO thread=#zio-fiber-102 message="Processing request" location=zio.stream.ZStreamAspectSpec.annotatedTests.stream file=ZStreamAspectSpec.scala line=44 service=user-api
+ adds single annotation to logs
timestamp=2025-06-25T15:19:09.521Z level=INFO thread=#zio-fiber-171 message="Processing item" location=zio.stream.ZStreamAspectSpec.annotatedTests.stream file=ZStreamAspectSpec.scala line=58 requestId=req-123 userId=user-456
timestamp=2025-06-25T15:19:09.522Z level=INFO thread=#zio-fiber-171 message="Processing item" location=zio.stream.ZStreamAspectSpec.annotatedTests.stream file=ZStreamAspectSpec.scala line=58 requestId=req-123 userId=user-456
timestamp=2025-06-25T15:19:09.523Z level=INFO thread=#zio-fiber-171 message="Processing item" location=zio.stream.ZStreamAspectSpec.annotatedTests.stream file=ZStreamAspectSpec.scala line=58 requestId=req-123 userId=user-456
+ adds multiple annotations via varargs
timestamp=2025-06-25T15:19:09.591Z level=INFO thread=#zio-fiber-240 message="inside stream" location=zio.stream.ZStreamAspectSpec.annotatedTests.stream file=ZStreamAspectSpec.scala line=73 scope=test
timestamp=2025-06-25T15:19:09.597Z level=INFO thread=#zio-fiber-239 message="outside stream" location=zio.stream.ZStreamAspectSpec.annotatedTests file=ZStreamAspectSpec.scala line=77
+ annotations are scoped to stream execution
+ works with empty streams
+ preserves stream elements
+ tagged aspect
+ adds single metric tag
+ adds multiple tags via composition
+ adds multiple tags in single call
timestamp=2025-06-25T15:19:09.839745002Z level=INFO thread=#zio-fiber-123 message="Processing request" location=zio.stream.ZStreamAspectSpec.annotatedTests.stream file=ZStreamAspectSpec.scala line=44 service=user-api
+ works with different metric types
+ rechunk aspect
+ adds single annotation to logs
+ creates single chunk when n exceeds stream size
timestamp=2025-06-25T15:19:09.944221231Z level=INFO thread=#zio-fiber-192 message="Processing item" location=zio.stream.ZStreamAspectSpec.annotatedTests.stream file=ZStreamAspectSpec.scala line=58 requestId=req-123 userId=user-456
timestamp=2025-06-25T15:19:09.945424450Z level=INFO thread=#zio-fiber-192 message="Processing item" location=zio.stream.ZStreamAspectSpec.annotatedTests.stream file=ZStreamAspectSpec.scala line=58 requestId=req-123 userId=user-456
timestamp=2025-06-25T15:19:09.945764678Z level=INFO thread=#zio-fiber-192 message="Processing item" location=zio.stream.ZStreamAspectSpec.annotatedTests.stream file=ZStreamAspectSpec.scala line=58 requestId=req-123 userId=user-456
+ creates perfectly sized chunks
+ adds multiple annotations via varargs
+ handles remainder chunks correctly
timestamp=2025-06-25T15:19:10.030889094Z level=INFO thread=#zio-fiber-263 message="inside stream" location=zio.stream.ZStreamAspectSpec.annotatedTests.stream file=ZStreamAspectSpec.scala line=73 scope=test
timestamp=2025-06-25T15:19:10.036205854Z level=INFO thread=#zio-fiber-262 message="outside stream" location=zio.stream.ZStreamAspectSpec.annotatedTests file=ZStreamAspectSpec.scala line=77
+ handles zero and negative chunk sizes
+ annotations are scoped to stream execution
+ preserves empty streams
+ works with empty streams
+ tagged aspect
+ works with large chunk sizes on infinite streams
+ maintains stream order
+ aspect composition
+ adds single metric tag
timestamp=2025-06-25T15:19:10.336Z level=INFO thread=#zio-fiber-1139 message="processing" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=267 trace=abc123
timestamp=2025-06-25T15:19:10.337Z level=INFO thread=#zio-fiber-1139 message="processing" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=267 trace=abc123
timestamp=2025-06-25T15:19:10.337Z level=INFO thread=#zio-fiber-1139 message="processing" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=267 trace=abc123
timestamp=2025-06-25T15:19:10.341Z level=INFO thread=#zio-fiber-1139 message="processing" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=267 trace=abc123
+ adds multiple tags via composition
+ composes with >>> operator
+ adds multiple tags in single call
timestamp=2025-06-25T15:19:10.420Z level=INFO thread=#zio-fiber-1208 message="Item 1" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=285 phase=processing step=1
timestamp=2025-06-25T15:19:10.432Z level=INFO thread=#zio-fiber-1208 message="Item 2" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=285 phase=processing step=1
timestamp=2025-06-25T15:19:10.433Z level=INFO thread=#zio-fiber-1208 message="Item 3" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=285 phase=processing step=1
+ works with different metric types
+ rechunk aspect
+ composes with multiple @@ applications
+ creates single chunk when n exceeds stream size
timestamp=2025-06-25T15:19:10.507Z level=INFO thread=#zio-fiber-1277 message="test" location=zio.stream.ZStreamAspectSpec.compositionTests.base file=ZStreamAspectSpec.scala line=308 key2=value2 key1=value1
timestamp=2025-06-25T15:19:10.510Z level=INFO thread=#zio-fiber-1278 message="test" location=zio.stream.ZStreamAspectSpec.compositionTests.base file=ZStreamAspectSpec.scala line=308 key1=value1 key2=value2
+ order independence for annotations
+ creates perfectly sized chunks
timestamp=2025-06-25T15:19:10.576Z level=INFO thread=#zio-fiber-1347 message="Processing 1" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:10.579Z level=INFO thread=#zio-fiber-1347 message="Processing 2" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:10.580Z level=INFO thread=#zio-fiber-1347 message="Processing 3" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:10.581Z level=INFO thread=#zio-fiber-1347 message="Processing 4" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:10.582Z level=INFO thread=#zio-fiber-1347 message="Processing 5" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:10.582Z level=INFO thread=#zio-fiber-1347 message="Processing 6" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:10.583Z level=INFO thread=#zio-fiber-1347 message="Processing 7" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:10.584Z level=INFO thread=#zio-fiber-1347 message="Processing 8" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:10.584Z level=INFO thread=#zio-fiber-1347 message="Processing 9" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:10.585Z level=INFO thread=#zio-fiber-1347 message="Processing 10" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
+ handles remainder chunks correctly
+ mixing different aspect types
+ error handling
+ stream failures propagate through aspects
+ handles zero and negative chunk sizes
timestamp=2025-06-25T15:19:10.691Z level=INFO thread=#zio-fiber-1487 message="before interrupt" location=zio.stream.ZStreamAspectSpec.errorHandlingTests.stream file=ZStreamAspectSpec.scala line=358 interrupted=yes
+ preserves empty streams
+ aspects preserve interruption
+ works with large chunk sizes on infinite streams
+ maintains stream order
+ aspect composition
timestamp=2025-06-25T15:19:10.817786305Z level=INFO thread=#zio-fiber-1170 message="processing" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=267 trace=abc123
timestamp=2025-06-25T15:19:10.818029982Z level=INFO thread=#zio-fiber-1170 message="processing" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=267 trace=abc123
timestamp=2025-06-25T15:19:10.818175756Z level=INFO thread=#zio-fiber-1170 message="processing" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=267 trace=abc123
timestamp=2025-06-25T15:19:10.818268410Z level=INFO thread=#zio-fiber-1170 message="processing" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=267 trace=abc123
+ resource safety with managed resources
+ composes with >>> operator
+ error in stream operation
+ performance characteristics
timestamp=2025-06-25T15:19:10.867093703Z level=INFO thread=#zio-fiber-1241 message="Item 1" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=285 phase=processing step=1
timestamp=2025-06-25T15:19:10.867757018Z level=INFO thread=#zio-fiber-1241 message="Item 2" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=285 phase=processing step=1
timestamp=2025-06-25T15:19:10.868118256Z level=INFO thread=#zio-fiber-1241 message="Item 3" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=285 phase=processing step=1
+ composes with multiple @@ applications
timestamp=2025-06-25T15:19:10.910272428Z level=INFO thread=#zio-fiber-1312 message="test" location=zio.stream.ZStreamAspectSpec.compositionTests.base file=ZStreamAspectSpec.scala line=308 key2=value2 key1=value1
timestamp=2025-06-25T15:19:10.912954482Z level=INFO thread=#zio-fiber-1313 message="test" location=zio.stream.ZStreamAspectSpec.compositionTests.base file=ZStreamAspectSpec.scala line=308 key1=value1 key2=value2
+ rechunk doesn't affect throughput significantly
+ order independence for annotations
timestamp=2025-06-25T15:19:11.023362515Z level=INFO thread=#zio-fiber-1382 message="Processing 1" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:11.027444617Z level=INFO thread=#zio-fiber-1382 message="Processing 2" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:11.027747655Z level=INFO thread=#zio-fiber-1382 message="Processing 3" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:11.027938684Z level=INFO thread=#zio-fiber-1382 message="Processing 4" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:11.028073186Z level=INFO thread=#zio-fiber-1382 message="Processing 5" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:11.028203732Z level=INFO thread=#zio-fiber-1382 message="Processing 6" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:11.028350998Z level=INFO thread=#zio-fiber-1382 message="Processing 7" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:11.028466885Z level=INFO thread=#zio-fiber-1382 message="Processing 8" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:11.029840504Z level=INFO thread=#zio-fiber-1382 message="Processing 9" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
timestamp=2025-06-25T15:19:11.030028016Z level=INFO thread=#zio-fiber-1382 message="Processing 10" location=zio.stream.ZStreamAspectSpec.compositionTests.stream file=ZStreamAspectSpec.scala line=327 operation=data-processing
+ annotations don't significantly impact performance
+ edge cases
+ mixing different aspect types
+ error handling
+ very large chunk sizes
+ stream failures propagate through aspects
timestamp=2025-06-25T15:19:11.126319291Z level=INFO thread=#zio-fiber-1521 message="before interrupt" location=zio.stream.ZStreamAspectSpec.errorHandlingTests.stream file=ZStreamAspectSpec.scala line=358 interrupted=yes
+ aspects preserve interruption
+ many annotations don't cause stack overflow
+ resource safety with managed resources
timestamp=2025-06-25T15:19:11.253Z level=INFO thread=#zio-fiber-1983 message="from first" location=zio.stream.ZStreamAspectSpec.edgeCaseTests.s1 file=ZStreamAspectSpec.scala line=460 stream=first
timestamp=2025-06-25T15:19:11.254Z level=INFO thread=#zio-fiber-1984 message="from second" location=zio.stream.ZStreamAspectSpec.edgeCaseTests.s2 file=ZStreamAspectSpec.scala line=461 stream=second
+ error in stream operation
+ performance characteristics
+ concurrent stream merging preserves aspects
+ aspects work with infinite streams
+ rechunk doesn't affect throughput significantly
timestamp=2025-06-25T15:19:11.331Z level=INFO thread=#zio-fiber-2128 message="deep" location=zio.stream.ZStreamAspectSpec.edgeCaseTests file=ZStreamAspectSpec.scala line=488 level3=3 level7=7 level6=6 level4=4 level5=5 level1=1 level10=10 level9=9 level2=2 level8=8
+ deeply nested aspect composition
+ annotations don't significantly impact performance
+ edge cases
+ very large chunk sizes
+ many annotations don't cause stack overflow
[info] No tests were executed
timestamp=2025-06-25T15:19:11.540993069Z level=INFO thread=#zio-fiber-2024 message="from first" location=zio.stream.ZStreamAspectSpec.edgeCaseTests.s1 file=ZStreamAspectSpec.scala line=460 stream=first
timestamp=2025-06-25T15:19:11.543506888Z level=INFO thread=#zio-fiber-2025 message="from second" location=zio.stream.ZStreamAspectSpec.edgeCaseTests.s2 file=ZStreamAspectSpec.scala line=461 stream=second
+ concurrent stream merging preserves aspects
+ aspects work with infinite streams
timestamp=2025-06-25T15:19:11.596944859Z level=INFO thread=#zio-fiber-2167 message="deep" location=zio.stream.ZStreamAspectSpec.edgeCaseTests file=ZStreamAspectSpec.scala line=488 level3=3 level7=7 level6=6 level4=4 level5=5 level1=1 level10=10 level9=9 level2=2 level8=8
+ deeply nested aspect composition
31 tests passed. 0 tests failed. 0 tests ignored.
Rishi Mondal
@MAVRICK-1
ZIO
@ZIO