Skip to content

Commit 511c8cb

Browse files
committed
Fix SA1513
1 parent e490141 commit 511c8cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptionsExtensions.cs

+3
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,13 @@ public static THeaders GetHeaders<THeaders>(this OtlpExporterOptions options, Ac
7474
pair = headersSpan.Slice(0, commaIndex);
7575
headersSpan = headersSpan.Slice(commaIndex + 1);
7676
}
77+
7778
int equalIndex = pair.IndexOf('=');
7879
if (equalIndex == -1)
7980
{
8081
throw new ArgumentException("Headers provided in an invalid format.");
8182
}
83+
8284
var key = pair.Slice(0, equalIndex).ToString().Trim();
8385
var value = pair.Slice(equalIndex + 1).ToString().Trim();
8486
addHeader(headers, key, value);
@@ -88,6 +90,7 @@ public static THeaders GetHeaders<THeaders>(this OtlpExporterOptions options, Ac
8890
{
8991
addHeader(headers, header.Key, header.Value);
9092
}
93+
9194
return headers;
9295
}
9396

0 commit comments

Comments
 (0)