Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsDue committed Dec 2, 2024
1 parent 169c15c commit af49af3
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ public class MetricNameGenerationTests
"NotifyWholesaleServicesResponse",
"RejectRequestWholesaleSettlement",
"MeteredDataForMeasurementPoint",
"MeteredDataForMeasurementPointResponse",
];

private static readonly DocumentType[] _doesNotHaveIncomingMessageResponse =
[
DocumentType.RejectRequestWholesaleSettlement,
DocumentType.RejectRequestAggregatedMeasureData
];

private readonly string[] _loggedMessageGenerationMetric = _formats.Select(
Expand Down Expand Up @@ -78,13 +85,15 @@ private static List<string> AllMessageGenerationsMetricsNames()
{
foreach (var documentType in documentTypes)
{
// Most documents are logged as an outgoing message and as a response to an incoming message
names.Add(MetricNameMapper.MessageGenerationMetricName(
documentType,
documentFormat,
false));
if (documentType.Name.Contains("Notify"))

// Some documents are only logged as an outgoing message
if (!_doesNotHaveIncomingMessageResponse.Contains(documentType))
{
// We're logging a response of a request as a separate message generation, even though it's the same document
names.Add(MetricNameMapper.MessageGenerationMetricName(
documentType,
documentFormat,
Expand Down

0 comments on commit af49af3

Please sign in to comment.