OTel Transports#3605
Conversation
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Gates Failed
New code is healthy
(1 new file with code health below 9.00)
Enforce critical code health rules
(1 file with Bumpy Road Ahead, Deep, Nested Complexity)
Enforce advisory code health rules
(1 file with Complex Method)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| New code is healthy | Violations | Code Health Impact | |
|---|---|---|---|
| TraceStateConverter.cs | 3 rules | 10.00 → 8.91 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| TraceStateConverter.cs | 2 critical rules | 10.00 → 8.91 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| TraceStateConverter.cs | 1 advisory rule | 10.00 → 8.91 | Suppress |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Gates Failed
New code is healthy
(1 new file with code health below 9.00)
Enforce critical code health rules
(1 file with Bumpy Road Ahead, Deep, Nested Complexity)
Enforce advisory code health rules
(1 file with Complex Method)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| New code is healthy | Violations | Code Health Impact | |
|---|---|---|---|
| TraceStateConverter.cs | 3 rules | 10.00 → 8.91 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| TraceStateConverter.cs | 2 critical rules | 10.00 → 8.91 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| TraceStateConverter.cs | 1 advisory rule | 10.00 → 8.91 | Suppress |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Code Health Improved
(11 files improve in Code Health)
Gates Failed
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(10 files with Complex Method, Code Duplication, Excess Number of Function Arguments)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.16 | Suppress |
| NContentTypeConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| RedisMessageCreator.cs | 2 advisory rules | 8.73 → 8.48 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.69 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.69 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.16 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.48 | Bumpy Road Ahead |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Code Health Improved
(11 files improve in Code Health)
Gates Failed
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(10 files with Complex Method, Code Duplication, Excess Number of Function Arguments)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.16 | Suppress |
| NContentTypeConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| RedisMessageCreator.cs | 2 advisory rules | 8.73 → 8.48 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.69 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.69 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.16 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.48 | Bumpy Road Ahead |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Code Health Improved
(11 files improve in Code Health)
Gates Failed
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(10 files with Complex Method, Code Duplication, Excess Number of Function Arguments)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.16 | Suppress |
| NContentTypeConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| RedisMessageCreator.cs | 2 advisory rules | 8.73 → 8.48 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.69 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.69 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.16 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.48 | Bumpy Road Ahead |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
…is awkward in that context (although MS type has limitations)
There was a problem hiding this comment.
Code Health Improved
(9 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(2 hotspots with Large Method, Complex Method)
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(17 files with Complex Method, Overall Code Complexity, Code Duplication, Large Method, Excess Number of Function Arguments)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| MsSqlOutbox.cs | 1 rule in this hotspot | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 rule in this hotspot | 8.36 → 8.29 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| CompressPayloadTransformer.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| CompressPayloadTransformerAsync.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| KafkaMessageProducer.cs | 1 advisory rule | 9.69 → 9.42 | Suppress |
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.41 | Suppress |
| RedisMessageCreator.cs | 2 advisory rules | 8.73 → 8.48 | Suppress |
| KafkaMessagingGateway.cs | 1 advisory rule | 9.05 → 8.80 | Suppress |
| MsSqlOutbox.cs | 1 advisory rule | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 advisory rule | 8.36 → 8.29 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.41 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.48 | Bumpy Road Ahead |
| MsSqlOutbox.cs | 8.22 → 7.97 | Complex Method |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
| using System.Collections; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Net.Mime; |
There was a problem hiding this comment.
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 4.22 across 9 functions. The mean complexity threshold is 4
| using System.Collections; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Net.Mime; |
There was a problem hiding this comment.
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 4.11 across 9 functions. The mean complexity threshold is 4
| } | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
❌ Getting worse: Code Duplication
introduced similar code in: ReadTraceParent,ReadTraceState
| new HeaderResult<string>(string.Empty, false) | ||
| ); | ||
| } | ||
| return MessageHeader.FailureMessageHeader(RoutingKey.Empty, Id.Empty); |
There was a problem hiding this comment.
❌ Getting worse: Complex Method
ReadHeader increases in cyclomatic complexity from 10 to 15, threshold = 9
| return | ||
| [ |
There was a problem hiding this comment.
❌ New issue: Large Method
InitAddDbParameters has 70 lines, threshold = 70
| catch (ConsumeException consumeException) | ||
| { | ||
| Log.ErrorListeningToTopic(s_logger, consumeException, Topic, _consumerConfig.GroupId, _consumerConfig.BootstrapServers); | ||
| Log.ErrorListeningToTopic(s_logger, consumeException, Topic ?? RoutingKey.Empty, _consumerConfig.GroupId, _consumerConfig.BootstrapServers); |
There was a problem hiding this comment.
❌ Getting worse: Complex Method
Receive increases in cyclomatic complexity from 9 to 12, threshold = 9
|
|
||
| if (message == null) | ||
| { | ||
| if (message is null) |
There was a problem hiding this comment.
❌ Getting worse: Complex Method
SendWithDelay increases in cyclomatic complexity from 10 to 12, threshold = 9
|
|
||
| if (message == null) | ||
| { | ||
| if (message is null) |
There was a problem hiding this comment.
❌ New issue: Complex Method
SendWithDelayAsync has a cyclomatic complexity of 9, threshold = 9
| if (RoutingKey.IsNullOrEmpty(Topic)) throw new InvalidOperationException("Topic cannot be null"); | ||
|
|
||
| using var adminClient = new AdminClientBuilder(ClientConfig).Build(); |
There was a problem hiding this comment.
❌ Getting worse: Complex Method
FindTopic increases in cyclomatic complexity from 13 to 14, threshold = 9
There was a problem hiding this comment.
Code Health Improved
(9 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(2 hotspots with Large Method, Complex Method)
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(17 files with Complex Method, Overall Code Complexity, Code Duplication, Large Method, Excess Number of Function Arguments)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| MsSqlOutbox.cs | 1 rule in this hotspot | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 rule in this hotspot | 8.36 → 8.29 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| CompressPayloadTransformer.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| CompressPayloadTransformerAsync.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| KafkaMessageProducer.cs | 1 advisory rule | 9.69 → 9.42 | Suppress |
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.41 | Suppress |
| RedisMessageCreator.cs | 2 advisory rules | 8.73 → 8.48 | Suppress |
| KafkaMessagingGateway.cs | 1 advisory rule | 9.05 → 8.80 | Suppress |
| MsSqlOutbox.cs | 1 advisory rule | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 advisory rule | 8.36 → 8.29 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.41 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.48 | Bumpy Road Ahead |
| MsSqlOutbox.cs | 8.22 → 7.97 | Complex Method |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
…ings, similar to params
There was a problem hiding this comment.
Code Health Improved
(9 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(2 hotspots with Large Method, Complex Method)
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(17 files with Complex Method, Overall Code Complexity, Code Duplication, Large Method, Excess Number of Function Arguments)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| MsSqlOutbox.cs | 1 rule in this hotspot | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 rule in this hotspot | 8.36 → 8.29 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| CompressPayloadTransformer.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| CompressPayloadTransformerAsync.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| KafkaMessageProducer.cs | 1 advisory rule | 9.69 → 9.42 | Suppress |
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.41 | Suppress |
| RedisMessageCreator.cs | 2 advisory rules | 8.73 → 8.48 | Suppress |
| KafkaMessagingGateway.cs | 1 advisory rule | 9.05 → 8.80 | Suppress |
| MsSqlOutbox.cs | 1 advisory rule | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 advisory rule | 8.36 → 8.29 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.41 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.48 | Bumpy Road Ahead |
| MsSqlOutbox.cs | 8.22 → 7.97 | Complex Method |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Code Health Improved
(9 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(1 hotspot with Large Method)
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(17 files with Complex Method, Overall Code Complexity, Code Duplication, Large Method, Excess Number of Function Arguments)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| MsSqlOutbox.cs | 1 rule in this hotspot | 8.22 → 7.97 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| CompressPayloadTransformer.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| CompressPayloadTransformerAsync.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| KafkaMessageProducer.cs | 1 advisory rule | 9.69 → 9.42 | Suppress |
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.41 | Suppress |
| RedisMessageCreator.cs | 2 advisory rules | 8.73 → 8.48 | Suppress |
| KafkaMessagingGateway.cs | 1 advisory rule | 9.05 → 8.80 | Suppress |
| MsSqlOutbox.cs | 1 advisory rule | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 advisory rule | 8.36 → 8.29 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.41 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.48 | Bumpy Road Ahead |
| MsSqlOutbox.cs | 8.22 → 7.97 | Complex Method |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
| /// <param name="baggage">The baggage for this message; follows the W3C standard</param> | ||
| public MessageHeader( | ||
| string messageId, | ||
| Id messageId, |
There was a problem hiding this comment.
❌ New issue: Complex Method
MessageHeader has a cyclomatic complexity of 9, threshold = 9
There was a problem hiding this comment.
Code Health Improved
(9 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(1 hotspot with Large Method)
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(18 files with Complex Method, Overall Code Complexity, Code Duplication, Large Method, Excess Number of Function Arguments)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| MsSqlOutbox.cs | 1 rule in this hotspot | 8.22 → 7.97 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| AzureServiceBusMesssageCreator.cs | 1 advisory rule | 10.00 → 9.39 | Suppress |
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| CompressPayloadTransformer.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| CompressPayloadTransformerAsync.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| KafkaMessageProducer.cs | 1 advisory rule | 9.69 → 9.42 | Suppress |
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.41 | Suppress |
| RedisMessageCreator.cs | 2 advisory rules | 8.73 → 8.48 | Suppress |
| KafkaMessagingGateway.cs | 1 advisory rule | 9.05 → 8.80 | Suppress |
| MsSqlOutbox.cs | 1 advisory rule | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 advisory rule | 8.36 → 8.29 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.41 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.48 | Bumpy Road Ahead |
| MsSqlOutbox.cs | 8.22 → 7.97 | Complex Method |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Code Health Improved
(9 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(1 hotspot with Large Method)
New code is healthy
(1 new file with code health below 9.00)
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(18 files with Complex Method, Overall Code Complexity, Code Duplication, Large Method, Excess Number of Function Arguments)
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| MsSqlOutbox.cs | 1 rule in this hotspot | 8.22 → 7.97 | Suppress |
| New code is healthy | Violations | Code Health Impact | |
|---|---|---|---|
| AzureServiceBusMesssageCreator.cs | 1 rule | 10.00 → 8.82 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| AzureServiceBusMesssageCreator.cs | 1 advisory rule | 10.00 → 8.82 | Suppress |
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| CompressPayloadTransformer.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| CompressPayloadTransformerAsync.cs | 1 advisory rule | 9.39 → 9.10 | Suppress |
| KafkaMessageProducer.cs | 1 advisory rule | 9.69 → 9.42 | Suppress |
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.41 | Suppress |
| RedisMessageCreator.cs | 2 advisory rules | 8.73 → 8.48 | Suppress |
| KafkaMessagingGateway.cs | 1 advisory rule | 9.05 → 8.80 | Suppress |
| MsSqlOutbox.cs | 1 advisory rule | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 advisory rule | 8.36 → 8.29 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.41 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.48 | Bumpy Road Ahead |
| MsSqlOutbox.cs | 8.22 → 7.97 | Complex Method |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
| private Baggage GetBaggage(IBrokeredMessageWrapper azureServiceBusMessage) | ||
| { | ||
| if (!azureServiceBusMessage.ApplicationProperties.TryGetValue(ASBConstants.Baggage, out object? property)) | ||
| { | ||
| s_logger.LogWarning("No baggage found in message from topic {Topic} via subscription {SubscriptionName}", _topic, subscription.Name); | ||
| return new Baggage(); | ||
| } | ||
|
|
||
| var baggageString = property.ToString() ?? string.Empty; | ||
|
|
||
| var baggage = new Baggage(); | ||
| baggage.LoadBaggage(baggageString); | ||
| return baggage; | ||
| } |
There was a problem hiding this comment.
❌ New issue: Code Duplication
The module contains 7 functions with similar structure: GetBaggage,GetCloudEventsDataSchema,GetCloudEventsSubject,GetCloudEventsType and 3 more functions
There was a problem hiding this comment.
Code Health Improved
(10 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(1 hotspot with Large Method)
New code is healthy
(1 new file with code health below 9.00)
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(16 files with Complex Method, Overall Code Complexity, Code Duplication, Large Method, Excess Number of Function Arguments)
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| MsSqlOutbox.cs | 1 rule in this hotspot | 8.22 → 7.97 | Suppress |
| New code is healthy | Violations | Code Health Impact | |
|---|---|---|---|
| AzureServiceBusMesssageCreator.cs | 1 rule | 10.00 → 8.82 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| AzureServiceBusMesssageCreator.cs | 1 advisory rule | 10.00 → 8.82 | Suppress |
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| KafkaMessageProducer.cs | 1 advisory rule | 9.69 → 9.42 | Suppress |
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.41 | Suppress |
| KafkaMessagingGateway.cs | 1 advisory rule | 9.05 → 8.80 | Suppress |
| MsSqlOutbox.cs | 1 advisory rule | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 advisory rule | 8.36 → 8.29 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RedisMessageCreator.cs | 1 advisory rule | 8.73 → 8.75 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.41 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.75 | Bumpy Road Ahead |
| MsSqlOutbox.cs | 8.22 → 7.97 | Complex Method |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
| { | ||
| var topic = Topic is not null ? new RoutingKey(Topic.Value) : RoutingKey.Empty; | ||
| throw new ChannelFailureException($"Topic: {topic} does not exist"); | ||
| } |
There was a problem hiding this comment.
❌ New issue: Complex Method
EnsureTopic has a cyclomatic complexity of 9, threshold = 9
There was a problem hiding this comment.
Code Health Improved
(11 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(1 hotspot with Large Method)
New code is healthy
(1 new file with code health below 9.00)
Enforce critical code health rules
(2 files with Bumpy Road Ahead)
Enforce advisory code health rules
(17 files with Complex Method, Overall Code Complexity, Code Duplication, Large Method, Excess Number of Function Arguments)
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| MsSqlOutbox.cs | 1 rule in this hotspot | 8.22 → 7.97 | Suppress |
| New code is healthy | Violations | Code Health Impact | |
|---|---|---|---|
| AzureServiceBusMesssageCreator.cs | 1 rule | 10.00 → 8.82 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| CloudEventsTransformer.cs | 1 critical rule | 9.05 → 9.35 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| AzureServiceBusMesssageCreator.cs | 1 advisory rule | 10.00 → 8.82 | Suppress |
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| KafkaMessageProducer.cs | 1 advisory rule | 9.69 → 9.42 | Suppress |
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.41 | Suppress |
| KafkaMessagingGateway.cs | 1 advisory rule | 9.05 → 8.80 | Suppress |
| MsSqlOutbox.cs | 1 advisory rule | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 advisory rule | 8.36 → 8.29 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RedisMessageCreator.cs | 1 advisory rule | 8.73 → 8.75 | Suppress |
| CloudEventsTransformer.cs | 1 advisory rule | 9.05 → 9.35 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.41 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.75 | Bumpy Road Ahead |
| MsSqlOutbox.cs | 8.22 → 7.97 | Complex Method |
| CloudEventsTransformer.cs | 9.05 → 9.35 | Complex Method, Overall Code Complexity |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
| private Message WritePublicationHeaders(Message message, Publication publication) | ||
| { | ||
| message.Header.Source = _source ?? publication.Source; | ||
| message.Header.Type = _type ?? publication.Type; | ||
| message.Header.DataSchema = _dataSchema ?? publication.DataSchema; | ||
| message.Header.Subject = _subject ?? publication.Subject; | ||
| message.Header.SpecVersion = _specVersion ?? message.Header.SpecVersion; | ||
|
|
||
| foreach (var additional in publication.CloudEventsAdditionalProperties ?? new Dictionary<string, object>()) | ||
| { | ||
| if (!message.Header.Bag.ContainsKey(additional.Key)) | ||
| { | ||
| message.Header.Bag[additional.Key] = additional.Value; | ||
| } | ||
| } | ||
| return message; | ||
| } |
There was a problem hiding this comment.
❌ New issue: Complex Method
WritePublicationHeaders has a cyclomatic complexity of 9, threshold = 9
| private static Message ReadCloudEventJsonMessage(Message message) | ||
| { |
There was a problem hiding this comment.
❌ New issue: Complex Method
ReadCloudEventJsonMessage has a cyclomatic complexity of 9, threshold = 9
There was a problem hiding this comment.
Code Health Improved
(11 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(1 hotspot with Large Method)
New code is healthy
(1 new file with code health below 9.00)
Enforce critical code health rules
(2 files with Bumpy Road Ahead)
Enforce advisory code health rules
(17 files with Complex Method, Overall Code Complexity, Code Duplication, Large Method, Excess Number of Function Arguments)
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| MsSqlOutbox.cs | 1 rule in this hotspot | 8.22 → 7.97 | Suppress |
| New code is healthy | Violations | Code Health Impact | |
|---|---|---|---|
| AzureServiceBusMesssageCreator.cs | 1 rule | 10.00 → 8.82 | Suppress |
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| BaggageConverter.cs | 1 critical rule | 10.00 → 9.84 | Suppress |
| CloudEventsTransformer.cs | 1 critical rule | 9.05 → 9.35 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| AzureServiceBusMesssageCreator.cs | 1 advisory rule | 10.00 → 8.82 | Suppress |
| NIdConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NRoutingKeyConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NSubscriptionNameConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceParentConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| NTraceStateConverter.cs | 1 advisory rule | 10.00 → 9.69 | Suppress |
| MessageHeader.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| MessageItem.cs | 1 advisory rule | 9.69 → 9.39 | Suppress |
| KafkaMessageProducer.cs | 1 advisory rule | 9.69 → 9.42 | Suppress |
| KafkaMessageCreator.cs | 1 advisory rule | 8.68 → 8.41 | Suppress |
| KafkaMessagingGateway.cs | 1 advisory rule | 9.05 → 8.80 | Suppress |
| MsSqlOutbox.cs | 1 advisory rule | 8.22 → 7.97 | Suppress |
| KafkaMessageConsumer.cs | 1 advisory rule | 8.36 → 8.29 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RmqMessagePublisher.cs | 1 advisory rule | 9.15 → 9.10 | Suppress |
| RedisMessageCreator.cs | 1 advisory rule | 8.73 → 8.75 | Suppress |
| CloudEventsTransformer.cs | 1 advisory rule | 9.05 → 9.35 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| RmqMessageCreator.cs | 7.11 → 8.28 | Code Duplication, Complex Method, Complex Conditional, Overall Code Complexity |
| RmqMessageCreator.cs | 7.29 → 8.28 | Code Duplication, Complex Method, Complex Conditional |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| RmqMessagePublisher.cs | 9.15 → 9.10 | Complex Method |
| KafkaDefaultMessageHeaderBuilder.cs | 9.47 → 9.66 | Complex Method |
| KafkaMessageCreator.cs | 8.68 → 8.41 | Complex Method, Complex Conditional |
| DynamoDbOutbox.cs | 6.70 → 6.91 | Primitive Obsession |
| MongoDbOutbox.cs | 7.55 → 7.79 | Primitive Obsession |
| ControlBusReceiverBuilder.cs | 8.46 → 8.73 | Primitive Obsession |
| InMemoryOutbox.cs | 8.03 → 8.28 | Primitive Obsession |
| RelationDatabaseOutbox.cs | 6.69 → 6.90 | Code Duplication, Primitive Obsession |
| SqsMessageSender.cs | 9.54 → 10.00 | Complex Method, Bumpy Road Ahead |
| RedisMessageCreator.cs | 8.73 → 8.75 | Bumpy Road Ahead |
| MsSqlOutbox.cs | 8.22 → 7.97 | Complex Method |
| CloudEventsTransformer.cs | 9.05 → 9.35 | Complex Method, Overall Code Complexity |
| CompressPayloadTransformer.cs | no change | Code Duplication |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
| private static Message WriteJsonMessage(Message message) | ||
| { | ||
| try | ||
| { | ||
| JsonElement? data = null; | ||
| string? dataBase64 = null; | ||
| var contentType = message.Header.ContentType?.ToString()?? string.Empty; | ||
| if (message.Body.Value.Length > 0) | ||
| { | ||
| if (contentType.Contains("application/json") || contentType.Contains("text/json")) | ||
| { | ||
| data = JsonSerializer.Deserialize<JsonElement>(message.Body.Value, JsonSerialisationOptions.Options); | ||
| } | ||
| else if (contentType.Contains("application/octet-stream")) | ||
| { | ||
| // Base64 encode binary data and use data_base64 | ||
| dataBase64 = Convert.ToBase64String(message.Body.Bytes); | ||
| } | ||
| else | ||
| { | ||
| // Properly encode the value as a JSON string | ||
| var encoded = JsonEncodedText.Encode(message.Body.Value); | ||
| data = JsonDocument.Parse($"\"{encoded.ToString()}\"").RootElement; | ||
| } | ||
| } | ||
|
|
||
| var cloudEvent = new JsonEvent | ||
| { | ||
| Id = message.Id, | ||
| SpecVersion = message.Header.SpecVersion, | ||
| Source = message.Header.Source, | ||
| Type = message.Header.Type, | ||
| DataContentType = contentType, | ||
| DataSchema = message.Header.DataSchema, | ||
| Subject = message.Header.Subject, | ||
| Time = message.Header.TimeStamp, | ||
| AdditionalProperties = message.Header.Bag, | ||
| Data = data, | ||
| DataBase64 = dataBase64 // Add this property to CloudEventMessage | ||
| }; | ||
|
|
||
| message.Body = new MessageBody(JsonSerializer.SerializeToUtf8Bytes(cloudEvent, JsonSerialisationOptions.Options)); | ||
| message.Header.ContentType = new ContentType("application/cloudevents+json"); | ||
|
|
||
| return message; | ||
| } | ||
| catch (JsonException e) | ||
| { | ||
| Log.ErrorDuringDeserializerAJsonOnWrap(s_logger, e); | ||
| return message; | ||
| } | ||
| } |
There was a problem hiding this comment.
❌ New issue: Bumpy Road Ahead
WriteJsonMessage has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function
* chore: fix casing on ADR * fix: update the ADR for a better understanding of how we propogate context * chore: update the name of InMemoryMessageProducer.cs to better fit the pattern used elsewhere * chore: swap Assert.True to Assert.Contains for collections * feat: failing test checks that we have added trace context to headers of outgoing message * feat: add a class to support trace state explicity * feat: modify tests * chore: filename issue * chore: switch to assert contains * feat: ensure that we propogate trace context * fix: allow trace context to serialize for tests * fixing broken tests * feat: add async tests * feat: add sync version of propogation tests * chore: whitespace * feat: add RMQ support for traceparent and tracestate. * fix: baggage is not tracecontext, although format is similar; baggage is user-defined * fix: tests were using tracestate not baggage * fix: crate link spans as MS committed change; propogate tracecontext and baggage through pipeline * fix: adjust test to ensure baggage on parent activity * fix: rename test class * chore: add tracestring and baggage to test * fix RMQ propogates the context * chore: port between RMQ instances * fix: add trace propogation to RMQ * fix: add kafka context propogation * chore: Add some primitive types to avoid primitive obsession warnings from codescene * chore: missing XML comments on public methods * chore: lower primitive obsession for message and request id * chore: usages of content type for new header * fix: adjust for reply to as a routing key * fix: add serialization for new value objects * chore: adjust docs * fix: issues with serialization of new primitive types * fix: ContentType.cs value may be null in constructor * fix: increase test delay as fragile * Update src/Paramore.Brighter/Id.cs Co-authored-by: Rafael Lillo <rafael.andrade@justeattakeaway.com> * fix: need to convert header types to primitives for bag * fix: make sync RMQ tests serial for reliability * fix: refactor LLM code * chore: move converters to own directory, add them for NewtonSoft for Kafka serdes * chore: remove spurious directory * fix: use a string base type for Id in a request, to make serializing it easily. * chore: unneeded namespace on attribute * feat: adding cloud events to Redis * fix: tests failing due to bad test string, does not use cloud events names * feat: add additional tests of persistence of message headers for new properties * fix: ASB tests need to check all properties * feat: use MS ContentType as used on public SDK and user defined type is awkward in that context (although MS type has limitations) * fix: body equality test not working * fix: errors with tests around cloud events transform; need to use strings, similar to params * fix: use charset with MS contenttype * feat: adding cloudevents support to ASB * feat: add cloud events and tracing to ASB * fix: correct tests for contenttype changes and cloudevents json specification * fix: correct for new content type --------- Co-authored-by: Rafael Lillo <rafael.andrade@justeattakeaway.com>
We need to propogate our context when sending, and retrieve our context when recieving. In addition, we need to add a span to the producer.
We don't need a span on the receiver, because the message pump will create one, but we do need to attach the relevant context from the message to the span.