Skip to content

Commit 6cc1f2c

Browse files
authored
Merge branch 'main' into fix-test-localization
2 parents 23e3112 + b659171 commit 6cc1f2c

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ jobs:
4141
show-progress: false
4242

4343
- name: Initialize CodeQL
44-
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
44+
uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
4545
with:
4646
build-mode: none
4747
languages: ${{ matrix.language }}
4848

4949
- name: Perform CodeQL Analysis
50-
uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
50+
uses: github/codeql-action/analyze@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
5151
with:
5252
category: '/language:${{ matrix.language }}'
5353

.github/workflows/ossf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
# Upload the results to GitHub's code scanning dashboard (optional).
4343
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
4444
- name: "Upload to code-scanning"
45-
uses: github/codeql-action/upload-sarif@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
45+
uses: github/codeql-action/upload-sarif@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
4646
with:
4747
sarif_file: results.sarif

src/OpenTelemetry.Api/Context/Propagation/TraceContextPropagator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ internal static bool TryExtractTraceparent(string traceparent, out ActivityTrace
173173

174174
try
175175
{
176-
traceId = ActivityTraceId.CreateFromString(traceparent.AsSpan().Slice(VersionPrefixIdLength, TraceIdLength));
176+
traceId = ActivityTraceId.CreateFromString(traceparent.AsSpan(VersionPrefixIdLength, TraceIdLength));
177177
}
178178
catch (ArgumentOutOfRangeException)
179179
{
@@ -189,7 +189,7 @@ internal static bool TryExtractTraceparent(string traceparent, out ActivityTrace
189189
byte optionsLowByte;
190190
try
191191
{
192-
spanId = ActivitySpanId.CreateFromString(traceparent.AsSpan().Slice(VersionAndTraceIdLength, SpanIdLength));
192+
spanId = ActivitySpanId.CreateFromString(traceparent.AsSpan(VersionAndTraceIdLength, SpanIdLength));
193193
_ = HexCharToByte(traceparent[VersionAndTraceIdAndSpanIdLength]); // to verify if there is no bad chars on options position
194194
optionsLowByte = HexCharToByte(traceparent[VersionAndTraceIdAndSpanIdLength + 1]);
195195
}

src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/Serializer/ProtobufSerializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ internal static int WriteStringWithTag(byte[] buffer, int writePosition, int fie
292292
}
293293
}
294294
#else
295-
var bytesWritten = Utf8Encoding.GetBytes(value, buffer.AsSpan().Slice(writePosition));
295+
var bytesWritten = Utf8Encoding.GetBytes(value, buffer.AsSpan(writePosition));
296296
Debug.Assert(bytesWritten == numberOfUtf8CharsInString, "bytesWritten did not match numberOfUtf8CharsInString");
297297
#endif
298298

src/OpenTelemetry/Metrics/Reader/MetricReaderExt.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public abstract partial class MetricReader
1919
private readonly Lock instrumentCreationLock = new();
2020
private int metricLimit;
2121
private int cardinalityLimit;
22-
private Metric?[]? metrics;
23-
private Metric[]? metricsCurrentBatch;
22+
private Metric?[] metrics = [];
23+
private Metric[] metricsCurrentBatch = [];
2424
private int metricIndex = -1;
2525
private ExemplarFilterType? exemplarFilter;
2626
private ExemplarFilterType? exemplarFilterForHistograms;

src/OpenTelemetry/Metrics/Reader/PeriodicExportingMetricReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public PeriodicExportingMetricReader(
4747
this.ExportIntervalMilliseconds = exportIntervalMilliseconds;
4848
this.ExportTimeoutMilliseconds = exportTimeoutMilliseconds;
4949

50-
this.exporterThread = new Thread(new ThreadStart(this.ExporterProc))
50+
this.exporterThread = new Thread(this.ExporterProc)
5151
{
5252
IsBackground = true,
5353
#pragma warning disable CA1062 // Validate arguments of public methods - needed for netstandard2.1

0 commit comments

Comments
 (0)