From 8d44a8da4428fbcfa823e8cb2aa2c90e4ec7f9a7 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 14:04:04 +0200 Subject: [PATCH 01/28] Prepare a 2.1.10 release --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ Backtrace/Backtrace.csproj | 8 ++++---- CHANGELOG.md | 15 +++++++++++++++ 3 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f1ea26f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Publish NuGet Package + +on: + push: + tags: + - "*.*.*" + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build ./Backtrace/Backtrace.csproj --no-restore --configuration Release + + - name: Pack + run: dotnet pack --configuration Release --no-build -o ./output + + - name: Publish to NuGet + env: + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} + run: dotnet nuget push ./output/*.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json diff --git a/Backtrace/Backtrace.csproj b/Backtrace/Backtrace.csproj index 9deacf6..72d6bde 100644 --- a/Backtrace/Backtrace.csproj +++ b/Backtrace/Backtrace.csproj @@ -6,7 +6,7 @@ true Backtrace Error Diagnostic Tools Debug Bug Bugs StackTrace Backtrace Error Diagnostic Tools Debug Bug Bugs StackTrace - 2.1.9 + 2.1.10-alpha Backtrace https://github.com/backtrace-labs/backtrace-csharp/blob/master/LICENSE https://github.com/backtrace-labs/backtrace-csharp @@ -17,14 +17,14 @@ Backtrace's integration with C# app allows customers to catch and report handled and unhandled C# exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug errors. https://github.com/backtrace-labs/backtrace-csharp en - 2.1.9 + 2.1.10-alpha en-US Backtrace I/O Backtrace I/O Backtrace I/O Backtrace I/O - 2.1.9.0 - 2.1.9.0 + 2.1.10.0 + 2.1.10.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index dc76bcd..c2fb6eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,21 @@ # Backtrace C# Release Notes +## Version 2.1.10 - 02.07.2024 + +Improvements: +- Updated dependencies to the latest verison. +- On uncaught exception, store a report in the database rather sending it to API. If the database is not available, try sending a report to the server (#36). +- Added `application.session`, `application.version`, `backtrace.agent` and `backtrace.version` attributes. +- Read `application.version` and `version` attributes only when the assembly is available. + + +Maintenance: +- Removed codeql-analysis action +- Moved testing and building to Github aciton (#37, #40) +- Added a CICD pipeline for releasing a new version of libraries + ## Version 2.1.9 - 08.06.2019 + - Changed acces modifiers in `BacktraceData` object. With this change, `BeforeSend` event allows to change `Annotations`, `ThreadInformation` and `SourceCode` property ## Version 2.1.8 - 26.03.2020 From 6890bb496d8ba17c03a662f0ea367f18d58e14ed Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 14:07:11 +0200 Subject: [PATCH 02/28] Include project path in the command --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1ea26f..27d9af1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: run: dotnet build ./Backtrace/Backtrace.csproj --no-restore --configuration Release - name: Pack - run: dotnet pack --configuration Release --no-build -o ./output + run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o ./output - name: Publish to NuGet env: From a298e69a5241c945ac1734edfa9f658869a6f986 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 14:09:26 +0200 Subject: [PATCH 03/28] Rename job name --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27d9af1..cd0959c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: - "*.*.*" jobs: - build: + release: runs-on: windows-latest steps: From 84679588aba5ff44f5eccffadbafb2f3f69243ea Mon Sep 17 00:00:00 2001 From: kdysput Date: Tue, 2 Jul 2024 14:45:31 +0200 Subject: [PATCH 04/28] Define full path to the nuget package --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd0959c..bdb8371 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,9 +25,9 @@ jobs: run: dotnet build ./Backtrace/Backtrace.csproj --no-restore --configuration Release - name: Pack - run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o ./output + run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o ./output/Backtrace.nupkg - name: Publish to NuGet env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - run: dotnet nuget push ./output/*.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + run: dotnet nuget push ./output/Backtrace.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json From f9d26b3ddb1876c1b1bff6322ce2470a3c575a5b Mon Sep 17 00:00:00 2001 From: kdysput Date: Tue, 2 Jul 2024 14:55:21 +0200 Subject: [PATCH 05/28] Use git tag value to find a package --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bdb8371..626ba27 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,9 +25,10 @@ jobs: run: dotnet build ./Backtrace/Backtrace.csproj --no-restore --configuration Release - name: Pack - run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o ./output/Backtrace.nupkg + run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o ./output/ - name: Publish to NuGet env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - run: dotnet nuget push ./output/Backtrace.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + PACKAGE_VERSION: ${{ github.ref_name }} + run: dotnet nuget push ./output/Backtrace$PACKAGE_VERSION.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json From 405c98a5d894509bf64e7baaaf065b49e1e17e6a Mon Sep 17 00:00:00 2001 From: kdysput Date: Tue, 2 Jul 2024 15:02:50 +0200 Subject: [PATCH 06/28] Echo package version and the final package directory --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 626ba27..01a0274 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,6 +27,11 @@ jobs: - name: Pack run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o ./output/ + - name: print current tag version + env: + PACKAGE_VERSION: ${{ github.ref_name }} + run: echo $PACKAGE_VERSION ./output/Backtrace$PACKAGE_VERSION.nupkg + - name: Publish to NuGet env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} From 93b3e7a5c00a55c37232603003e8d20fefc2a028 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 15:10:50 +0200 Subject: [PATCH 07/28] use env --- .github/workflows/release.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01a0274..c821fe2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,12 +28,10 @@ jobs: run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o ./output/ - name: print current tag version - env: - PACKAGE_VERSION: ${{ github.ref_name }} - run: echo $PACKAGE_VERSION ./output/Backtrace$PACKAGE_VERSION.nupkg + run: echo ${{ env.RELEASE_VERSION }} ./output/Backtrace$${{ env.RELEASE_VERSION }}.nupkg - name: Publish to NuGet env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} PACKAGE_VERSION: ${{ github.ref_name }} - run: dotnet nuget push ./output/Backtrace$PACKAGE_VERSION.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + run: dotnet nuget push ./output/Backtrace${{ env.RELEASE_VERSION }}.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json From 31e8a0f7aa659ebb391912a9f6ec52850d0663ae Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 15:15:37 +0200 Subject: [PATCH 08/28] Use github_ref --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c821fe2..3ea5b3e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,10 +28,10 @@ jobs: run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o ./output/ - name: print current tag version - run: echo ${{ env.RELEASE_VERSION }} ./output/Backtrace$${{ env.RELEASE_VERSION }}.nupkg + run: echo $GITHUB_REF ./output/Backtrace$GITHUB_REF.nupkg - name: Publish to NuGet env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} PACKAGE_VERSION: ${{ github.ref_name }} - run: dotnet nuget push ./output/Backtrace${{ env.RELEASE_VERSION }}.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + run: dotnet nuget push ./output/Backtrace$GITHUB_REF.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json From 030c3c5c2cb38353a0a28eab885b7f26bf9f0b2e Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 15:23:20 +0200 Subject: [PATCH 09/28] Export to variable --- .github/workflows/release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ea5b3e..d4906eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,12 +4,17 @@ on: push: tags: - "*.*.*" +env: + PACKAGE_VERSION: ${{ steps.extract_version.outputs.VERSION }} jobs: release: runs-on: windows-latest steps: + - name: print current tag version + run: echo "$PACKAGE_VERSION ./output/Backtrace$PACKAGE_VERSION.nupkg" + - name: Checkout code uses: actions/checkout@v4 @@ -33,5 +38,4 @@ jobs: - name: Publish to NuGet env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - PACKAGE_VERSION: ${{ github.ref_name }} - run: dotnet nuget push ./output/Backtrace$GITHUB_REF.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + run: dotnet nuget push ./output/Backtrace$PACKAGE_VERSION.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json From 1e85ab92d2bf477f9025a1546e5cba8ae59ee7d0 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 15:27:02 +0200 Subject: [PATCH 10/28] Additional export step --- .github/workflows/release.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d4906eb..a782999 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,16 +4,17 @@ on: push: tags: - "*.*.*" -env: - PACKAGE_VERSION: ${{ steps.extract_version.outputs.VERSION }} jobs: release: runs-on: windows-latest steps: - - name: print current tag version - run: echo "$PACKAGE_VERSION ./output/Backtrace$PACKAGE_VERSION.nupkg" + - name: Extract version from tag + run: echo "PACKAGE_VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV + + - name: version + run: echo "./output/Backtrace$PACKAGE_VERSION.nupkg" - name: Checkout code uses: actions/checkout@v4 From 9985ee0ba2a9c5de21edf4bfe2edcfa007f300bd Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 15:56:04 +0200 Subject: [PATCH 11/28] Try to export a different way the version variable --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a782999..56fbf81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Extract version from tag - run: echo "PACKAGE_VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV + run: echo VERSION=${GITHUB_REF#refs/tags/v} >> $env:GITHUB_ENV - name: version run: echo "./output/Backtrace$PACKAGE_VERSION.nupkg" From 300bc27c4aeef9d5619353a8986f7c6514b834bf Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 17:28:40 +0200 Subject: [PATCH 12/28] Display the git tag value --- .github/workflows/release.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56fbf81..274da1f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,10 +11,13 @@ jobs: steps: - name: Extract version from tag - run: echo VERSION=${GITHUB_REF#refs/tags/v} >> $env:GITHUB_ENV + id: extract_version + run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $env:GITHUB_ENV + shell: pwsh - - name: version - run: echo "./output/Backtrace$PACKAGE_VERSION.nupkg" + - name: Verify extracted version + run: echo "Extracted version is: $env:VERSION" + shell: pwsh - name: Checkout code uses: actions/checkout@v4 From f59a290c801fe637d62bf226625a9d7f267bb415 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 17:56:42 +0200 Subject: [PATCH 13/28] Fix YAML --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 274da1f..114fcc9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: shell: pwsh - name: Verify extracted version - run: echo "Extracted version is: $env:VERSION" + run: echo "Extracted version is $env:VERSION" shell: pwsh - name: Checkout code From d3f9a79c266eae3e1066beba0f0734cdbe0917f1 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 18:59:21 +0200 Subject: [PATCH 14/28] Change the way how a step reads github tag --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 114fcc9..e0ed1ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Extract version from tag id: extract_version - run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $env:GITHUB_ENV + run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $env:GITHUB_ENV shell: pwsh - name: Verify extracted version From d3611dc5a4266645d30717b97a834615b9c70195 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 19:05:21 +0200 Subject: [PATCH 15/28] Extract git tag via different option --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e0ed1ab..b520999 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: shell: pwsh - name: Verify extracted version - run: echo "Extracted version is $env:VERSION" + run: echo "Extracted version is $env:VERSION ${{ github.ref_name }}" shell: pwsh - name: Checkout code From 55502f79d257ce5acdb282001ddda269fa255059 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 19:07:12 +0200 Subject: [PATCH 16/28] Use git tag to determine the package name --- .github/workflows/release.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b520999..92310df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,15 +10,6 @@ jobs: runs-on: windows-latest steps: - - name: Extract version from tag - id: extract_version - run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $env:GITHUB_ENV - shell: pwsh - - - name: Verify extracted version - run: echo "Extracted version is $env:VERSION ${{ github.ref_name }}" - shell: pwsh - - name: Checkout code uses: actions/checkout@v4 @@ -42,4 +33,4 @@ jobs: - name: Publish to NuGet env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - run: dotnet nuget push ./output/Backtrace$PACKAGE_VERSION.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + run: dotnet nuget push ./output/Backtrace${{ github.ref_name }}.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json From 335a10425c58f15b94b53f9a4c1415724c651276 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 19:11:09 +0200 Subject: [PATCH 17/28] Use different library name --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 92310df..23d9aa7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,4 +33,4 @@ jobs: - name: Publish to NuGet env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - run: dotnet nuget push ./output/Backtrace${{ github.ref_name }}.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + run: dotnet nuget push ./output/Backtrace.${{ github.ref_name }}.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json From fbd1d411ebcce510ceee39ff86448856c1b3a225 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Tue, 2 Jul 2024 19:17:29 +0200 Subject: [PATCH 18/28] Cleanup the flow --- .github/workflows/release.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23d9aa7..b248cac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,12 +25,9 @@ jobs: run: dotnet build ./Backtrace/Backtrace.csproj --no-restore --configuration Release - name: Pack - run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o ./output/ - - - name: print current tag version - run: echo $GITHUB_REF ./output/Backtrace$GITHUB_REF.nupkg + run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o . - name: Publish to NuGet env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - run: dotnet nuget push ./output/Backtrace.${{ github.ref_name }}.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + run: dotnet nuget push ./Backtrace.${{ github.ref_name }}.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json From 1c11ab7a5887db4ac5fa12b08bf35b1be47647db Mon Sep 17 00:00:00 2001 From: kdysput Date: Wed, 3 Jul 2024 11:46:18 +0200 Subject: [PATCH 19/28] Print directory before publish --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b248cac..b37059b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,4 +30,6 @@ jobs: - name: Publish to NuGet env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - run: dotnet nuget push ./Backtrace.${{ github.ref_name }}.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + run: | + ls + dotnet nuget push Backtrace.${{ github.ref_name }}.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json From 55bee7c652da92ffcbbfdf51c5a49f0f47e7bb5e Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Wed, 3 Jul 2024 11:54:24 +0200 Subject: [PATCH 20/28] Escape nuget api key --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b37059b..3fc6d34 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,4 +32,4 @@ jobs: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} run: | ls - dotnet nuget push Backtrace.${{ github.ref_name }}.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + dotnet nuget push Backtrace.${{ github.ref_name }}.nupkg -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json From ca33db4d749c5eafbddea8727aba937fe5050cad Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Wed, 3 Jul 2024 12:05:10 +0200 Subject: [PATCH 21/28] Use secret directly in the command --- .github/workflows/release.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3fc6d34..da11c00 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,8 +28,4 @@ jobs: run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o . - name: Publish to NuGet - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - run: | - ls - dotnet nuget push Backtrace.${{ github.ref_name }}.nupkg -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json + run: dotnet nuget push Backtrace.${{ github.ref_name }}.nupkg -k "${{ secrets.NUGET_API_KEY }}" -s https://api.nuget.org/v3/index.json From 499267d693054adbd94eb6fae067b3a48bc1e7b4 Mon Sep 17 00:00:00 2001 From: kdysput Date: Wed, 3 Jul 2024 12:39:32 +0200 Subject: [PATCH 22/28] Use up to date nuget properties --- Backtrace/Backtrace.csproj | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Backtrace/Backtrace.csproj b/Backtrace/Backtrace.csproj index 72d6bde..9db0be4 100644 --- a/Backtrace/Backtrace.csproj +++ b/Backtrace/Backtrace.csproj @@ -6,18 +6,20 @@ true Backtrace Error Diagnostic Tools Debug Bug Bugs StackTrace Backtrace Error Diagnostic Tools Debug Bug Bugs StackTrace - 2.1.10-alpha + 2.1.10-alpha1 Backtrace https://github.com/backtrace-labs/backtrace-csharp/blob/master/LICENSE + LICENSE https://github.com/backtrace-labs/backtrace-csharp http://backtrace.io/images/icon.png + http://backtrace.io/images/icon.png en-US - http://backtrace.io/images/icon.png + http://backtrace.io/images/icon.png Backtrace's integration with C# applications allows customers to capture and report handled and unhandled C# exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors. Backtrace's integration with C# app allows customers to catch and report handled and unhandled C# exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug errors. https://github.com/backtrace-labs/backtrace-csharp en - 2.1.10-alpha + 2.1.10-alpha1 en-US Backtrace I/O Backtrace I/O @@ -25,8 +27,14 @@ Backtrace I/O 2.1.10.0 2.1.10.0 + README.md + + + + + From a7524c807eacead13e5ec23192447c5bb0edf1e1 Mon Sep 17 00:00:00 2001 From: kdysput Date: Wed, 3 Jul 2024 12:49:32 +0200 Subject: [PATCH 23/28] Remove deprecated option and include icon in the package --- Backtrace/Backtrace.csproj | 4 ++-- icon.png | Bin 0 -> 4717 bytes 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 icon.png diff --git a/Backtrace/Backtrace.csproj b/Backtrace/Backtrace.csproj index 9db0be4..9942abe 100644 --- a/Backtrace/Backtrace.csproj +++ b/Backtrace/Backtrace.csproj @@ -8,11 +8,10 @@ Backtrace Error Diagnostic Tools Debug Bug Bugs StackTrace 2.1.10-alpha1 Backtrace - https://github.com/backtrace-labs/backtrace-csharp/blob/master/LICENSE LICENSE https://github.com/backtrace-labs/backtrace-csharp http://backtrace.io/images/icon.png - http://backtrace.io/images/icon.png + icon.png en-US http://backtrace.io/images/icon.png Backtrace's integration with C# applications allows customers to capture and report handled and unhandled C# exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors. @@ -33,6 +32,7 @@ + diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8401296734482950dc53b1d512244ae0a7a090d0 GIT binary patch literal 4717 zcmXX~3p|u*7oQn3NGnr@#291S-DbBGr6C5h5!)s;-KeA~TaoKTnIwko!Wc8!eu)yB zDcUb#x|xbh7c;)HQrg@pQ*zm8iVUf~^E`ciKfm{Vo_WsyT;B6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8=D<(lifU| z=hG^_g$R=_S52;m@h=c!SFiR4(&RzN9IIuuN&oNtARUEJuV7SY#wT^c&W62$a9TwX z2H^}#~UDO5u9p^X5u-2QvoKTF6+VN3r;_KQ*`NNQ!_ny3qhLAG#Y-avb0e2si z#JeN=G)SxWJgDAxM*`41zJ})LLEILT-?)R*Rq_5%i_NwF5Fn(Hq`Swr_c=35e27iv z)UP$bbDtkt?Ar_DI*kG^9I=J)-5>-3ytvn?)@Hd6+fhn4p>f4OA{3?$7n9rqQEc+p znS3cew+h%-U`c_u80B}*5G(J0X7LkAcl+VJBc|=fk0wE*sF5#u2aOqOWYWJGB=}&F z-wN+If3gU~ysQK8mQ*7q!AFUMe`2TMo&x7}l-ZSM{@RbC87w~IHQ3r#cadhcK zB7u10C-L`V?NAO@iQ&Kr_;^z3r#RPT5rHR|GUD5uh^ci6>R0f&#YHV}il=8oGT-mg zUoW@Fwmf#L*1c!-)3D&_!_qAHY;(DiGh(UhRW39MIx+43>7MrO`ZZtdic1X|y~bZw Q6X0+8vH+j5rTn!20o#!t^#A|> literal 0 HcmV?d00001 From fb52b857adbf88b2e4e7f0ddfd2a1e19ffe1f138 Mon Sep 17 00:00:00 2001 From: kdysput Date: Wed, 3 Jul 2024 14:38:04 +0200 Subject: [PATCH 24/28] Update README.md and csproj with a new icon location --- Backtrace/Backtrace.csproj | 8 +- .../Documents/Images/Backtrace.png | Bin README.md | 117 ++++-------------- 3 files changed, 29 insertions(+), 96 deletions(-) rename icon.png => Backtrace/Documents/Images/Backtrace.png (100%) diff --git a/Backtrace/Backtrace.csproj b/Backtrace/Backtrace.csproj index 9942abe..283a5c6 100644 --- a/Backtrace/Backtrace.csproj +++ b/Backtrace/Backtrace.csproj @@ -6,19 +6,19 @@ true Backtrace Error Diagnostic Tools Debug Bug Bugs StackTrace Backtrace Error Diagnostic Tools Debug Bug Bugs StackTrace - 2.1.10-alpha1 + 2.1.10 Backtrace LICENSE https://github.com/backtrace-labs/backtrace-csharp http://backtrace.io/images/icon.png - icon.png + Backtrace.png en-US http://backtrace.io/images/icon.png Backtrace's integration with C# applications allows customers to capture and report handled and unhandled C# exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors. Backtrace's integration with C# app allows customers to catch and report handled and unhandled C# exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug errors. https://github.com/backtrace-labs/backtrace-csharp en - 2.1.10-alpha1 + 2.1.10 en-US Backtrace I/O Backtrace I/O @@ -32,7 +32,7 @@ - + diff --git a/icon.png b/Backtrace/Documents/Images/Backtrace.png similarity index 100% rename from icon.png rename to Backtrace/Documents/Images/Backtrace.png diff --git a/README.md b/README.md index 76b7d11..08c7a7e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Backtrace -[![Backtrace@release](https://img.shields.io/badge/Backtrace%40master-2.1.9-blue.svg)](https://www.nuget.org/packages/Backtrace) +[![Backtrace@release](https://img.shields.io/badge/Backtrace%40master-2.1.10-blue.svg)](https://www.nuget.org/packages/Backtrace) [Backtrace](http://backtrace.io/)'s integration with C# applications allows customers to capture and report handled and unhandled C# exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors. @@ -9,9 +9,9 @@ ## Usage ```csharp -// replace with your endpoint url and token +// replace with your universe name and token var backtraceCredentials = - new BacktraceCredentials(@"https://myserver.sp.backtrace.io:6097", "4dca18e8769d0f5d10db0d1b665e64b3d716f76bf182fbcdad5d1d8070c12db0"); + new BacktraceCredentials(@"https://submit.backtrace.io/universe-name/token/json"); var backtraceClient = new BacktraceClient(backtraceCredentials); try{ @@ -49,7 +49,7 @@ catch(Exception exception){ 7. [Good to know](#good-to-know) 8. [Release Notes](#changelog) -# Features Summary +# Features Summary - Light-weight C# client library that quickly submits C#/.NET exceptions and crashes to your Backtrace dashboard - Can include callstack, system metadata, custom metadata, and file attachments (e.g. minidump) if needed. @@ -60,7 +60,7 @@ catch(Exception exception){ - Fully customizable and extendable event handlers and base classes for custom implementations - Available as a [NuGet Package](https://www.nuget.org/packages/Backtrace/) as well as a fully open-sourced [Github Release](https://github.com/backtrace-labs/backtrace-csharp/). -# Supported .NET Frameworks +# Supported .NET Frameworks - .NET Framework 3.5 + - .NET Framework 4.5 + @@ -72,9 +72,9 @@ catch(Exception exception){ - Universal Windows Platform - Unity -# Installation +# Installation -## Prerequisites +## Prerequisites ### Development Environment @@ -86,7 +86,7 @@ catch(Exception exception){ The [**Backtrace** library](https://www.nuget.org/packages/Backtrace/) is available on NuGet. You can read more about NuGet and how to download the packages [here](https://docs.microsoft.com/en-us/nuget/) -## Installing Backtrace via NuGet +## Installing Backtrace via NuGet You can install Backtrace via NuGet using the following commands: @@ -102,76 +102,9 @@ Linux/Mac OS X .NET Core CLI: dotnet add package Backtrace ``` -# Running sample application +# Documentation -## Visual Studio - -Visual Studio allows you to build a project and run all available samples (includes support for .NET Core, .NET Framework 4.5, .NET Framework 3.5). - -- Double click `.sln` file or **open** project directory in Visual Studio. -- In **Solution Explorer** navigate to directory `Sample` and set preferred project (.NET Core/Framework) as startup project. - -![Visual Studio](https://github.com/backtrace-labs/backtrace-csharp/raw/master/Backtrace/Documents/Images/VisualStudio.PNG) - -- Open `Program.cs` class in any **Backtrace Sample project** and replace `BacktraceCredential` constructor patemeters with with your `Backtrace endpoint URL` (e.g. https://xxx.sp.backtrace.io:6098) and `submission token`: - -```csharp - var backtraceCredentials = new BacktraceCredentials(@"https://myserver.sp.backtrace.io:6097", "4dca18e8769d0f5d10db0d1b665e64b3d716f76bf182fbcdad5d1d8070c12db0"); -``` - -- Press `Ctrl+Shift+B` to `build` solution -- Press `F5` to run the project -- You should see new errors in your Backtrace instance. Refresh the Project page or Query Builder to see new details in real-time. - -## .NET Core command line - -You can use .NET Core's CLI to run sample project on Windows, Mac OS and Linux. To run a sample project using .NET Core CLI: - -- While in solution directory, navigate to **Backtrace.Core** sample application: - -``` - cd Backtrace.Core -``` - -- Open `Program.cs` in project **Backtrace.Core** and replace `BacktraceCredential` constructor parameters with with your `Backtrace endpoint URL` (e.g. https://xxx.sp.backtrace.io:6098) and `submission token`: - -```csharp - var backtraceCredentials = new BacktraceCredentials(@"https://myserver.sp.backtrace.io:6097", "4dca18e8769d0f5d10db0d1b665e64b3d716f76bf182fbcdad5d1d8070c12db0"); -``` - -- Build the project: - -``` - dotnet build -``` - -- When the build completes, run the project: - -``` - dotnet run -``` - -- You should see new errors in your Backtrace instance. Refresh the Project page or Query Builder to see new details in real-time. - -## Visual Studio for MacOS - -- Open the **Backtrace** solution in Visual Studio, unload all projects except **Backtrace**, **Backtrace.Tests** and **Backtrace.Core**, and set **Backtrace.Core** as your startup project: - -![VisualStudioMacOS](https://github.com/backtrace-labs/backtrace-csharp/raw/master/Backtrace/Documents/Images/VisualStudioMacOS.PNG) - -- Open `Program.cs` class in project **Backtrace.Core** and replace `BacktraceCredential` constructor parameters with with your `Backtrace endpoint URL` (e.g. https://xxx.sp.backtrace.io:6098) and `submission token`: - -```csharp - var backtraceCredentials = new BacktraceCredentials(@"https://myserver.sp.backtrace.io:6097", "4dca18e8769d0f5d10db0d1b665e64b3d716f76bf182fbcdad5d1d8070c12db0"); -``` - -- Build the project. -- Upon successful build, run the project. -- You should see new errors in your Backtrace instance. Refresh the Project page or Query Builder to see new details in real-time. - -# Documentation - -## Initialize a new BacktraceClient +## Initialize a new BacktraceClient First create a `BacktraceCredential` instance with your `Backtrace endpoint URL` (e.g. https://xxx.sp.backtrace.io:6098) and `submission token`, and supply it as a parameter in the `BacktraceClient` constructor: @@ -192,7 +125,7 @@ var configuration = new BacktraceClientConfiguration(credentials){ var backtraceClient = new BacktraceClient(configuration); ``` -For more information on `BacktraceClientConfiguration` parameters please see Architecture section. +For more information on `BacktraceClientConfiguration` parameters please see Architecture section. Notes: @@ -200,7 +133,7 @@ Notes: - If you develop application behind the proxy you can pass `WebProxy` object to `BacktraceCredentials` object. We will try to use `WebProxy` object when user pass it to `Backtrace`. To setup proxy use property `Proxy`, - `BacktraceClient` allows you to unpack `AggregateExceptions` and send only exceptions that are available in `InnerException` property of `AggregateException`. By default `BacktraceClient` will send `AggregateException` information to Backtrace server. To avoid sending these reports, please override `UnpackAggregateException` and set value to `true`. -#### Database initialization +#### Database initialization `BacktraceClient` allows you to customize the initialization of `BacktraceDatabase` for local storage of error reports by supplying a `BacktraceDatabaseSettings` parameter, as follows: @@ -258,7 +191,7 @@ Notes: - `BacktarceDatabase` `Delete` method will remove record (with multiple deduplicated records) at the same time. - You can override default hash method by using `GenerateHash` delegate available in `BacktraceDatabase` object. When you add your own method implementation, `BacktraceDatabase` won't use default deduplication mechanism. -## Sending an error report +## Sending an error report `BacktraceClient.Send/BacktraceClient.SendAsync` method will send an error report to the Backtrace endpoint specified. There `Send` method is overloaded, see examples below: @@ -353,7 +286,7 @@ catch (Exception exception) } ``` -## Attaching custom event handlers +## Attaching custom event handlers `BacktraceClient` allows you to attach your custom event handlers. For example, you can trigger actions before the `Send` method: @@ -397,17 +330,17 @@ backtraceClient.HandleApplicationException(); Unhandled application exception handler will store your report in database. In case if you won't see your report in Backtrace, you will have to relaunch your application. -## Custom client and report classes +## Custom client and report classes You can extend `BacktraceBase` to create your own Backtrace client and error report implementation. You can refer to `BacktraceClient` for implementation inspirations. -# Architecture +# Architecture -## BacktraceReport +## BacktraceReport **`BacktraceReport`** is a class that describe a single error report. Keep in mind that `BacktraceClient` uses `CallingAssembly` method to retrieve information about your application. -## BacktraceClient +## BacktraceClient **`BacktraceClient`** is a class that allows you to instantiate a client instance that interacts with `BacktraceApi`. This class sets up connection to the Backtrace endpoint and manages error reporting behavior (for example, saving minidump files on your local hard drive and limiting the number of error reports per minute). `BacktraceClient` extends `BacktraceBase` class. @@ -417,11 +350,11 @@ You can extend `BacktraceBase` to create your own Backtrace client and error rep - `ClientAttributes` - custom attributes to be submitted to Backtrace alongside the error report. - `ReportPerMin` - A cap on the number of reports that can be sent per minute. If `ReportPerMin` is equal to zero then there is no cap. -## BacktraceData +## BacktraceData **`BacktraceData`** is a serializable class that holds the data to create a diagnostic JSON to be sent to the Backtrace endpoint via `BacktraceApi`. You can add additional pre-processors for `BacktraceData` by attaching an event handler to the `BacktraceClient.BeforeSend` event. `BacktraceData` require `BacktraceReport` and `BacktraceClient` client attributes. -## BacktraceApi +## BacktraceApi **`BacktraceApi`** is a class that sends diagnostic JSON to the Backtrace endpoint. `BacktraceApi` is instantiated when the `BacktraceClient` constructor is called. You use the following event handlers in `BacktraceApi` to customize how you want to handle JSON data: @@ -431,11 +364,11 @@ You can extend `BacktraceBase` to create your own Backtrace client and error rep `BacktraceApi` can send synchronous and asynchronous reports to the Backtrace endpoint. To enable asynchronous report (default is synchronous) you have to set `AsynchronousRequest` property to `true`. -## BacktraceResult +## BacktraceResult **`BacktraceResult`** is a class that holds response and result from a `Send` or `SendAsync` call. The class contains a `Status` property that indicates whether the call was completed (`OK`), the call returned with an error (`ServerError`), the call was aborted because client reporting limit was reached (`LimitReached`), or the call wasn't needed because developer use `UnpackAggregateException` property with empty `AggregateException` object (`Empty`). Additionally, the class has a `Message` property that contains details about the status. Note that the `Send` call may produce an error report on an inner exception, in this case you can find an additional `BacktraceResult` object in the `InnerExceptionResult` property. -## BacktraceDatabase +## BacktraceDatabase **`BacktraceDatabase`** is a class that stores error report data in your local hard drive. If `DatabaseSettings` dones't contain a **valid** `DatabasePath` then `BacktraceDatabase` won't generate minidump files and store error report data. @@ -455,11 +388,11 @@ stored reports every `RetryInterval` seconds up to `RetryLimit` times, both cust If you want to clear your database or remove all reports after send method you can use `Clear`, `Flush` and `FlushAsync` methods. -## ReportWatcher +## ReportWatcher **`ReportWatcher`** is a class that validate send requests to the Backtrace endpoint. If `reportPerMin` is set in the `BacktraceClient` constructor call, `ReportWatcher` will drop error reports that go over the limit. `BacktraceClient` check rate limit before `BacktraceApi` generate diagnostic json. -# Good to know +# Good to know ## Xamarin @@ -469,6 +402,6 @@ You can use this Backtrace library with Xamarin if you change your `HttpClient` [androidsupport]: https://github.com/backtrace-labs/backtrace-csharp/raw/master/Backtrace/Documents/Images/AndroidSupport.PNG "Xamarin Android Support" -# Release Notes +# Release Notes See release notes [here](./CHANGELOG.md). From 1618f7a1fd6e103c45d84b18d447cafccd3393eb Mon Sep 17 00:00:00 2001 From: kdysput Date: Wed, 3 Jul 2024 14:38:53 +0200 Subject: [PATCH 25/28] Changelog update --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2fb6eb..f72d054 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ Improvements: - On uncaught exception, store a report in the database rather sending it to API. If the database is not available, try sending a report to the server (#36). - Added `application.session`, `application.version`, `backtrace.agent` and `backtrace.version` attributes. - Read `application.version` and `version` attributes only when the assembly is available. +- Added support for the `error.type` attribute. +- Fixed the problem when the `guid` attribute value was set incorrectly. Maintenance: From b0417ab029cf7ca6e8f1b18649f3d89d252fd54e Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Wed, 3 Jul 2024 14:44:30 +0200 Subject: [PATCH 26/28] Update CHANGELOG.md Co-authored-by: Sebastian Alex --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f72d054..44d0b99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ Improvements: Maintenance: - Removed codeql-analysis action -- Moved testing and building to Github aciton (#37, #40) +- Moved testing and building to Github action (#37, #40) - Added a CICD pipeline for releasing a new version of libraries ## Version 2.1.9 - 08.06.2019 From 5fc6225c4319d1a4955d6de4368077ab27c6f907 Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Wed, 3 Jul 2024 14:44:42 +0200 Subject: [PATCH 27/28] Update README.md Co-authored-by: Sebastian Alex --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 08c7a7e..7ee92ac 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ var configuration = new BacktraceClientConfiguration(credentials){ var backtraceClient = new BacktraceClient(configuration); ``` -For more information on `BacktraceClientConfiguration` parameters please see Architecture section. +For more information on `BacktraceClientConfiguration` parameters please see [Architecture](#architecture). Notes: From 3fec956fdf7ff82db6d7eb75b064d2f6bea8c8dd Mon Sep 17 00:00:00 2001 From: Konrad Dysput Date: Wed, 3 Jul 2024 17:30:45 +0200 Subject: [PATCH 28/28] Add a reference to the pull request --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44d0b99..79ee670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,8 @@ Improvements: - On uncaught exception, store a report in the database rather sending it to API. If the database is not available, try sending a report to the server (#36). - Added `application.session`, `application.version`, `backtrace.agent` and `backtrace.version` attributes. - Read `application.version` and `version` attributes only when the assembly is available. -- Added support for the `error.type` attribute. -- Fixed the problem when the `guid` attribute value was set incorrectly. +- Added support for the `error.type` attribute (#42). +- Fixed the problem when the `guid` attribute value was set incorrectly (#43). Maintenance: