Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ jobs:
with:
name: ${{ matrix.name }}
path: ${{ matrix.path }}
pr-strategy: update
secrets:
api-token: ${{ secrets.CI_DEPLOY_KEY }}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

- Transaction sampling ([#38](https://github.com/getsentry/sentry-powershell/pull/41))

### Dependencies

- Bump Dotnet SDK from v4.1.2 to v4.3.0 ([#44](https://github.com/getsentry/sentry-powershell/pull/44))
- [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#430)
- [diff](https://github.com/getsentry/sentry-dotnet/compare/4.1.2...4.3.0)

## 0.0.2

### Various fixes & improvements
Expand Down
2 changes: 1 addition & 1 deletion dependencies/Sentry.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version = 4.1.2
version = 4.3.0
repo = https://github.com/getsentry/sentry-dotnet
license = MIT
2 changes: 1 addition & 1 deletion modules/Sentry/public/Out-Sentry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function Out-Sentry

return [Sentry.SentrySdk]::CaptureEvent($event_, [System.Action[Sentry.Scope]] {
param([Sentry.Scope]$scope)
[Sentry.ScopeExtensions]::AddEventProcessor($scope, $processor)
$scope.AddEventProcessor($processor)

# Execute the script block in the caller's scope (nothing to do $scope) & set the automatic $_ variable to the $scope object.
$scope | ForEach-Object $EditScope
Expand Down
6 changes: 3 additions & 3 deletions modules/Sentry/public/Start-Sentry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ function Start-Sentry
$options.ShutDownTimeout = $options.FlushTimeout
$options.ReportAssembliesMode = [Sentry.ReportAssembliesMode]::None
$options.IsGlobalModeEnabled = $true
[Sentry.sentryOptionsExtensions]::AddIntegration($options, [ScopeIntegration]::new())
[Sentry.sentryOptionsExtensions]::AddEventProcessor($options, [EventUpdater]::new())
$options.AddIntegration([ScopeIntegration]::new())
$options.AddEventProcessor([EventUpdater]::new())

if ($DebugPreference -eq 'SilentlyContinue')
{
Expand Down Expand Up @@ -61,7 +61,7 @@ function Start-Sentry
}

# Workaround for https://github.com/getsentry/sentry-dotnet/issues/3141
[Sentry.SentryOptionsExtensions]::DisableAppDomainProcessExitFlush($options)
$options.DisableAppDomainProcessExitFlush()
}
process
{
Expand Down
2 changes: 1 addition & 1 deletion tests/init.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Describe 'SentrySdk' {
$testIntegration = [TestIntegration]::new()
Start-Sentry {
$_.Dsn = 'https://[email protected]/1'
[Sentry.sentryOptionsExtensions]::AddIntegration($_, $testIntegration)
$_.AddIntegration($testIntegration)
}
[Sentry.SentrySdk]::IsEnabled | Should -Be $true
$testIntegration.Options | Should -BeOfType [Sentry.SentryOptions]
Expand Down
6 changes: 2 additions & 4 deletions tests/scope.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ Describe 'Edit-SentryScope' {
}

It 'adds a file attachment via global scope' {
Edit-SentryScope {
[Sentry.ScopeExtensions]::AddAttachment($_, $PSCommandPath)
}
Edit-SentryScope { $_.AddAttachment($PSCommandPath) }
'message' | Out-Sentry
$transport.Envelopes.Count | Should -Be 1
[Sentry.Protocol.Envelopes.Envelope]$envelope = $transport.Envelopes.ToArray()[0]
Expand All @@ -29,7 +27,7 @@ Describe 'Edit-SentryScope' {
It 'adds a byte attachment via local scope' {
'message' | Out-Sentry -EditScope {
[byte[]] $data = 1, 2, 3, 4, 5
[Sentry.ScopeExtensions]::AddAttachment($_, $data, 'filename.bin')
$_.AddAttachment($data, 'filename.bin')
}
$transport.Envelopes.Count | Should -Be 1
[Sentry.Protocol.Envelopes.Envelope]$envelope = $transport.Envelopes.ToArray()[0]
Expand Down