Skip to content

Commit 60fd847

Browse files
Prepare a 2.1.10 release (#41)
* Prepare a 2.1.10 release * Include project path in the command * Rename job name * Define full path to the nuget package * Use git tag value to find a package * Echo package version and the final package directory * use env * Use github_ref * Export to variable * Additional export step * Try to export a different way the version variable * Display the git tag value * Fix YAML * Change the way how a step reads github tag * Extract git tag via different option * Use git tag to determine the package name * Use different library name * Cleanup the flow * Print directory before publish * Escape nuget api key * Use secret directly in the command * Use up to date nuget properties * Remove deprecated option and include icon in the package * Update README.md and csproj with a new icon location * Changelog update * Update CHANGELOG.md Co-authored-by: Sebastian Alex <[email protected]> * Update README.md Co-authored-by: Sebastian Alex <[email protected]> * Add a reference to the pull request --------- Co-authored-by: Sebastian Alex <[email protected]>
1 parent 9305311 commit 60fd847

File tree

5 files changed

+87
-98
lines changed

5 files changed

+87
-98
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish NuGet Package
2+
3+
on:
4+
push:
5+
tags:
6+
- "*.*.*"
7+
8+
jobs:
9+
release:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up .NET
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: 8.0.x
20+
21+
- name: Restore dependencies
22+
run: dotnet restore
23+
24+
- name: Build
25+
run: dotnet build ./Backtrace/Backtrace.csproj --no-restore --configuration Release
26+
27+
- name: Pack
28+
run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o .
29+
30+
- name: Publish to NuGet
31+
run: dotnet nuget push Backtrace.${{ github.ref_name }}.nupkg -k "${{ secrets.NUGET_API_KEY }}" -s https://api.nuget.org/v3/index.json

Backtrace/Backtrace.csproj

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,35 @@
66
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
77
<PackageTags>Backtrace Error Diagnostic Tools Debug Bug Bugs StackTrace</PackageTags>
88
<tags>Backtrace Error Diagnostic Tools Debug Bug Bugs StackTrace</tags>
9-
<PackageVersion>2.1.9</PackageVersion>
9+
<PackageVersion>2.1.10</PackageVersion>
1010
<Product>Backtrace</Product>
11-
<PackageLicenseUrl>https://github.com/backtrace-labs/backtrace-csharp/blob/master/LICENSE</PackageLicenseUrl>
11+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1212
<projectUrl>https://github.com/backtrace-labs/backtrace-csharp</projectUrl>
1313
<PackageIconUrl>http://backtrace.io/images/icon.png</PackageIconUrl>
14+
<PackageIcon>Backtrace.png</PackageIcon>
1415
<language>en-US</language>
15-
<iconUrl>http://backtrace.io/images/icon.png</iconUrl>
16+
<Icon>http://backtrace.io/images/icon.png</Icon>
1617
<Description>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.</Description>
1718
<Summary>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.</Summary>
1819
<RepositoryUrl>https://github.com/backtrace-labs/backtrace-csharp</RepositoryUrl>
1920
<NeutralLanguage>en</NeutralLanguage>
20-
<Version>2.1.9</Version>
21+
<Version>2.1.10</Version>
2122
<PackageLanguage>en-US</PackageLanguage>
2223
<Copyright>Backtrace I/O</Copyright>
2324
<Authors>Backtrace I/O</Authors>
2425
<Owners>Backtrace I/O</Owners>
2526
<Company>Backtrace I/O</Company>
26-
<AssemblyVersion>2.1.9.0</AssemblyVersion>
27-
<FileVersion>2.1.9.0</FileVersion>
27+
<AssemblyVersion>2.1.10.0</AssemblyVersion>
28+
<FileVersion>2.1.10.0</FileVersion>
29+
<PackageReadmeFile>README.md</PackageReadmeFile>
2830
</PropertyGroup>
2931

32+
<ItemGroup>
33+
<None Include="..\README.md" Pack="true" PackagePath="\" />
34+
<None Include="..\LICENSE" Pack="true" PackagePath="\" />
35+
<None Include="Documents\Images\Backtrace.png" Pack="true" PackagePath="\" />
36+
</ItemGroup>
37+
3038
<ItemGroup>
3139
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
3240
</ItemGroup>
4.61 KB
Loading

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
# Backtrace C# Release Notes
22

3+
## Version 2.1.10 - 02.07.2024
4+
5+
Improvements:
6+
- Updated dependencies to the latest verison.
7+
- 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).
8+
- Added `application.session`, `application.version`, `backtrace.agent` and `backtrace.version` attributes.
9+
- Read `application.version` and `version` attributes only when the assembly is available.
10+
- Added support for the `error.type` attribute (#42).
11+
- Fixed the problem when the `guid` attribute value was set incorrectly (#43).
12+
13+
14+
Maintenance:
15+
- Removed codeql-analysis action
16+
- Moved testing and building to Github action (#37, #40)
17+
- Added a CICD pipeline for releasing a new version of libraries
18+
319
## Version 2.1.9 - 08.06.2019
20+
421
- Changed acces modifiers in `BacktraceData` object. With this change, `BeforeSend` event allows to change `Annotations`, `ThreadInformation` and `SourceCode` property
522

623
## Version 2.1.8 - 26.03.2020

README.md

Lines changed: 25 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Backtrace
22

3-
[![Backtrace@release](https://img.shields.io/badge/Backtrace%40master-2.1.9-blue.svg)](https://www.nuget.org/packages/Backtrace)
3+
[![Backtrace@release](https://img.shields.io/badge/Backtrace%40master-2.1.10-blue.svg)](https://www.nuget.org/packages/Backtrace)
44

55
[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.
66

@@ -9,9 +9,9 @@
99
## Usage
1010

1111
```csharp
12-
// replace with your endpoint url and token
12+
// replace with your universe name and token
1313
var backtraceCredentials =
14-
new BacktraceCredentials(@"https://myserver.sp.backtrace.io:6097", "4dca18e8769d0f5d10db0d1b665e64b3d716f76bf182fbcdad5d1d8070c12db0");
14+
new BacktraceCredentials(@"https://submit.backtrace.io/universe-name/token/json");
1515
var backtraceClient = new BacktraceClient(backtraceCredentials);
1616

1717
try{
@@ -49,7 +49,7 @@ catch(Exception exception){
4949
7. [Good to know](#good-to-know)
5050
8. [Release Notes](#changelog)
5151

52-
# Features Summary <a name="features-summary"></a>
52+
# Features Summary
5353

5454
- Light-weight C# client library that quickly submits C#/.NET exceptions and crashes to your Backtrace dashboard
5555
- Can include callstack, system metadata, custom metadata, and file attachments (e.g. minidump) if needed.
@@ -60,7 +60,7 @@ catch(Exception exception){
6060
- Fully customizable and extendable event handlers and base classes for custom implementations
6161
- 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/).
6262

63-
# Supported .NET Frameworks <a name="supported-frameworks"></a>
63+
# Supported .NET Frameworks
6464

6565
- .NET Framework 3.5 +
6666
- .NET Framework 4.5 +
@@ -72,9 +72,9 @@ catch(Exception exception){
7272
- Universal Windows Platform
7373
- Unity
7474

75-
# Installation <a name="installation"></a>
75+
# Installation
7676

77-
## Prerequisites <a name="installation-before-start"></a>
77+
## Prerequisites
7878

7979
### Development Environment
8080

@@ -86,7 +86,7 @@ catch(Exception exception){
8686

8787
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/)
8888

89-
## Installing Backtrace via NuGet <a name="installation-nuget"></a>
89+
## Installing Backtrace via NuGet
9090

9191
You can install Backtrace via NuGet using the following commands:
9292

@@ -102,76 +102,9 @@ Linux/Mac OS X .NET Core CLI:
102102
dotnet add package Backtrace
103103
```
104104

105-
# Running sample application <a name="sample-app"></a>
105+
# Documentation
106106

107-
## Visual Studio <a name="sample-app-vs"></a>
108-
109-
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).
110-
111-
- Double click `.sln` file or **open** project directory in Visual Studio.
112-
- In **Solution Explorer** navigate to directory `Sample` and set preferred project (.NET Core/Framework) as startup project.
113-
114-
![Visual Studio](https://github.com/backtrace-labs/backtrace-csharp/raw/master/Backtrace/Documents/Images/VisualStudio.PNG)
115-
116-
- 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`:
117-
118-
```csharp
119-
var backtraceCredentials = new BacktraceCredentials(@"https://myserver.sp.backtrace.io:6097", "4dca18e8769d0f5d10db0d1b665e64b3d716f76bf182fbcdad5d1d8070c12db0");
120-
```
121-
122-
- Press `Ctrl+Shift+B` to `build` solution
123-
- Press `F5` to run the project
124-
- You should see new errors in your Backtrace instance. Refresh the Project page or Query Builder to see new details in real-time.
125-
126-
## .NET Core command line <a name="sample-app-cli"></a>
127-
128-
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:
129-
130-
- While in solution directory, navigate to **Backtrace.Core** sample application:
131-
132-
```
133-
cd Backtrace.Core
134-
```
135-
136-
- 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`:
137-
138-
```csharp
139-
var backtraceCredentials = new BacktraceCredentials(@"https://myserver.sp.backtrace.io:6097", "4dca18e8769d0f5d10db0d1b665e64b3d716f76bf182fbcdad5d1d8070c12db0");
140-
```
141-
142-
- Build the project:
143-
144-
```
145-
dotnet build
146-
```
147-
148-
- When the build completes, run the project:
149-
150-
```
151-
dotnet run
152-
```
153-
154-
- You should see new errors in your Backtrace instance. Refresh the Project page or Query Builder to see new details in real-time.
155-
156-
## Visual Studio for MacOS <a name="sample-app-vs-mac"></a>
157-
158-
- 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:
159-
160-
![VisualStudioMacOS](https://github.com/backtrace-labs/backtrace-csharp/raw/master/Backtrace/Documents/Images/VisualStudioMacOS.PNG)
161-
162-
- 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`:
163-
164-
```csharp
165-
var backtraceCredentials = new BacktraceCredentials(@"https://myserver.sp.backtrace.io:6097", "4dca18e8769d0f5d10db0d1b665e64b3d716f76bf182fbcdad5d1d8070c12db0");
166-
```
167-
168-
- Build the project.
169-
- Upon successful build, run the project.
170-
- You should see new errors in your Backtrace instance. Refresh the Project page or Query Builder to see new details in real-time.
171-
172-
# Documentation <a name="documentation"></a>
173-
174-
## Initialize a new BacktraceClient <a name="documentation-initialization"></a>
107+
## Initialize a new BacktraceClient
175108

176109
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:
177110

@@ -192,15 +125,15 @@ var configuration = new BacktraceClientConfiguration(credentials){
192125
var backtraceClient = new BacktraceClient(configuration);
193126
```
194127

195-
For more information on `BacktraceClientConfiguration` parameters please see <a href="#architecture-BacktraceClient">Architecture</a> section.
128+
For more information on `BacktraceClientConfiguration` parameters please see [Architecture](#architecture).
196129

197130
Notes:
198131

199132
- If parameter `reportPerMin` is equal to 0, there is no limit on the number of error reports per minute. When the `reportPerMin` cap is reached, `BacktraceClient.Send/BacktraceClient.SendAsync` method will return false,
200133
- 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`,
201134
- `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`.
202135

203-
#### Database initialization <a name="documentation-database-initialization"></a>
136+
#### Database initialization
204137

205138
`BacktraceClient` allows you to customize the initialization of `BacktraceDatabase` for local storage of error reports by supplying a `BacktraceDatabaseSettings` parameter, as follows:
206139

@@ -258,7 +191,7 @@ Notes:
258191
- `BacktarceDatabase` `Delete` method will remove record (with multiple deduplicated records) at the same time.
259192
- 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.
260193

261-
## Sending an error report <a name="documentation-sending-report"></a>
194+
## Sending an error report
262195

263196
`BacktraceClient.Send/BacktraceClient.SendAsync` method will send an error report to the Backtrace endpoint specified. There `Send` method is overloaded, see examples below:
264197

@@ -353,7 +286,7 @@ catch (Exception exception)
353286
}
354287
```
355288

356-
## Attaching custom event handlers <a name="documentation-events"></a>
289+
## Attaching custom event handlers
357290

358291
`BacktraceClient` allows you to attach your custom event handlers. For example, you can trigger actions before the `Send` method:
359292

@@ -397,17 +330,17 @@ backtraceClient.HandleApplicationException();
397330

398331
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.
399332

400-
## Custom client and report classes <a name="documentation-customization"></a>
333+
## Custom client and report classes
401334

402335
You can extend `BacktraceBase` to create your own Backtrace client and error report implementation. You can refer to `BacktraceClient` for implementation inspirations.
403336

404-
# Architecture <a name="architecture"></a>
337+
# Architecture
405338

406-
## BacktraceReport <a name="architecture-BacktraceReport"></a>
339+
## BacktraceReport
407340

408341
**`BacktraceReport`** is a class that describe a single error report. Keep in mind that `BacktraceClient` uses `CallingAssembly` method to retrieve information about your application.
409342

410-
## BacktraceClient <a name="architecture-BacktraceClient"></a>
343+
## BacktraceClient
411344

412345
**`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.
413346

@@ -417,11 +350,11 @@ You can extend `BacktraceBase` to create your own Backtrace client and error rep
417350
- `ClientAttributes` - custom attributes to be submitted to Backtrace alongside the error report.
418351
- `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.
419352

420-
## BacktraceData <a name="architecture-BacktraceData"></a>
353+
## BacktraceData
421354

422355
**`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.
423356

424-
## BacktraceApi <a name="architecture-BacktraceApi"></a>
357+
## BacktraceApi
425358

426359
**`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:
427360

@@ -431,11 +364,11 @@ You can extend `BacktraceBase` to create your own Backtrace client and error rep
431364

432365
`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`.
433366

434-
## BacktraceResult <a name="architecture-BacktraceResult"></a>
367+
## BacktraceResult
435368

436369
**`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.
437370

438-
## BacktraceDatabase <a name="architecture-BacktraceDatabase"></a>
371+
## BacktraceDatabase
439372

440373
**`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.
441374

@@ -455,11 +388,11 @@ stored reports every `RetryInterval` seconds up to `RetryLimit` times, both cust
455388

456389
If you want to clear your database or remove all reports after send method you can use `Clear`, `Flush` and `FlushAsync` methods.
457390

458-
## ReportWatcher <a name="architecture-ReportWatcher"></a>
391+
## ReportWatcher
459392

460393
**`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.
461394

462-
# Good to know <a name="good-to-know"></a>
395+
# Good to know
463396

464397
## Xamarin
465398

@@ -469,6 +402,6 @@ You can use this Backtrace library with Xamarin if you change your `HttpClient`
469402

470403
[androidsupport]: https://github.com/backtrace-labs/backtrace-csharp/raw/master/Backtrace/Documents/Images/AndroidSupport.PNG "Xamarin Android Support"
471404

472-
# Release Notes <a name="changelog"></a>
405+
# Release Notes
473406

474407
See release notes [here](./CHANGELOG.md).

0 commit comments

Comments
 (0)