From 0106a8628540a626f99eb5d6ba8be57afb5ed043 Mon Sep 17 00:00:00 2001 From: Justin Bergen Date: Thu, 25 Jan 2024 09:55:31 -0700 Subject: [PATCH 1/2] Removed duplicate appending of log records (#504) --- .../OpenTelemetryProtocolHttp/logs/OtlpHttpLogExporter.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/Sources/Exporters/OpenTelemetryProtocolHttp/logs/OtlpHttpLogExporter.swift b/Sources/Exporters/OpenTelemetryProtocolHttp/logs/OtlpHttpLogExporter.swift index 4e982913..cc81dda9 100644 --- a/Sources/Exporters/OpenTelemetryProtocolHttp/logs/OtlpHttpLogExporter.swift +++ b/Sources/Exporters/OpenTelemetryProtocolHttp/logs/OtlpHttpLogExporter.swift @@ -23,9 +23,7 @@ public class OtlpHttpLogExporter : OtlpHttpExporterBase, LogRecordExporter { } public func export(logRecords: [OpenTelemetrySdk.ReadableLogRecord], explicitTimeout: TimeInterval? = nil) -> OpenTelemetrySdk.ExportResult { - pendingLogRecords.append(contentsOf: logRecords) var sendingLogRecords: [ReadableLogRecord] = [] - exporterLock.withLockVoid { pendingLogRecords.append(contentsOf: logRecords) sendingLogRecords = pendingLogRecords From 0033445b1de9516c16b75d678b0003a8b5ec1c8b Mon Sep 17 00:00:00 2001 From: Ignacio Bonafonte Date: Thu, 25 Jan 2024 18:08:42 +0100 Subject: [PATCH 2/2] Revert automatic version number (#511) * Revert "Update updateVersion.sh (#508)" This reverts commit be46a97818a74f9227fdac192e9f176b716e7435. * Revert "Automatic version number on GitHub release (#507)" This reverts commit cf398998df0ec53c66f256f295aa2e00e748540e. --- .github/workflows/createRelease.yml | 20 -------------------- Scripts/updateVersion.sh | 12 ------------ Sources/OpenTelemetrySdk/Version.swift | 2 +- 3 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 .github/workflows/createRelease.yml delete mode 100644 Scripts/updateVersion.sh diff --git a/.github/workflows/createRelease.yml b/.github/workflows/createRelease.yml deleted file mode 100644 index 34a3dab5..00000000 --- a/.github/workflows/createRelease.yml +++ /dev/null @@ -1,20 +0,0 @@ -# This workflow will build a Swift project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift - -name: Create release - -on: - release: - types: [created] - -jobs: - release: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v3 - - name: Get the tag version - id: tag_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: Update version - run: sh Scripts/updateVersion.sh $GITHUB_TOKEN ${{ steps.tag_version.outputs.VERSION }} diff --git a/Scripts/updateVersion.sh b/Scripts/updateVersion.sh deleted file mode 100644 index 7d5a5db5..00000000 --- a/Scripts/updateVersion.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# This script expects two inputs -# $1 - The github token for opentelemetry-swift -# $2 - the git tag - -#Update version number -sed -E -i '' 's/public static let OTEL_SWIFT_SDK_VERSION = ".+"/public static let OTEL_SWIFT_SDK_VERSION = "'$2\"/ ./Sources/OpenTelemetrySdk/Version.swift -cat ./Sources/OpenTelemetrySdk/Version.swift -git add ./Sources/OpenTelemetrySdk/Version.swift -git commit -m "Updated version number to $2" -git tag -f $2 -git push -f --tags origin HEAD:main diff --git a/Sources/OpenTelemetrySdk/Version.swift b/Sources/OpenTelemetrySdk/Version.swift index 8fdcb02e..3d96ec04 100644 --- a/Sources/OpenTelemetrySdk/Version.swift +++ b/Sources/OpenTelemetrySdk/Version.swift @@ -6,5 +6,5 @@ import Foundation extension Resource { -public static let OTEL_SWIFT_SDK_VERSION = "1.8.0" + public static let OTEL_SWIFT_SDK_VERSION : String = "1.8.0" }