Skip to content

Commit 795105a

Browse files
vaindJoshFerge
authored andcommitted
feat: PowerShell support (backend) (#67577)
<!-- Describe your PR here. --> This adds a new SDK to the backend: PowerShell I've implemented these changes by copying what is done for platform elixir. I've tested the changes locally and everything seems to work fine AFAICT. frontend PR: #67576 <!-- Sentry employees and contractors can delete or ignore the following. --> ### Legal Boilerplate Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. --------- Co-authored-by: Josh Ferge <josh.ferge@gmail.com>
1 parent baab707 commit 795105a

File tree

9 files changed

+27
-1
lines changed

9 files changed

+27
-1
lines changed

bin/extension_language_map.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"lua",
5252
"ocaml",
5353
"hcl",
54+
"powershell",
5455
]
5556

5657
EXTENSION_LANGUAGE_MAP: dict[str, str] = {}

fixtures/integration-docs/_platforms.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,18 @@
425425
],
426426
"id": "mock",
427427
"name": "Mock"
428+
},
429+
{
430+
"integrations": [
431+
{
432+
"link": "https://docs.getsentry.com/platforms/powershell/",
433+
"type": "language",
434+
"id": "powershell",
435+
"name": "PowerShell"
436+
}
437+
],
438+
"id": "powershell",
439+
"name": "PowerShell"
428440
}
429441
]
430442
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"html": "<div class=\"section\" id=\"installation\">\n<h2>Installation</h2>\n<p>A <a class=\"reference external\" href=\"https://www.powershellgallery.com/packages/Sentry/\">PowerShell module</a> is available for Sentry.</p>\n</div>\n",
3+
"link": "https://docs.getsentry.com/platforms/powrshell/",
4+
"id": "powershell",
5+
"name": "PowerShell"
6+
}

src/sentry/constants.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,9 @@ def from_str(cls, string: str) -> int:
906906
"pm": "perl",
907907
"psgi": "perl",
908908
"t": "perl",
909+
"ps1": "powershell",
910+
"psd1": "powershell",
911+
"psm1": "powershell",
909912
"py": "python",
910913
"gyp": "python",
911914
"gypi": "python",

src/sentry/issues/event.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
}
171171
},
172172
"platform": {
173-
"description": " Platform identifier of this event (defaults to \"other\").\n\n A string representing the platform the SDK is submitting from. This will be used by the\n Sentry interface to customize various components in the interface, but also to enter or\n skip stacktrace processing.\n\n Acceptable values are: `as3`, `c`, `cfml`, `cocoa`, `csharp`, `elixir`, `haskell`, `go`,\n `groovy`, `java`, `javascript`, `native`, `node`, `objc`, `other`, `perl`, `php`, `python`,\n `ruby`",
173+
"description": " Platform identifier of this event (defaults to \"other\").\n\n A string representing the platform the SDK is submitting from. This will be used by the\n Sentry interface to customize various components in the interface, but also to enter or\n skip stacktrace processing.\n\n Acceptable values are: `as3`, `c`, `cfml`, `cocoa`, `csharp`, `elixir`, `haskell`, `go`,\n `groovy`, `java`, `javascript`, `native`, `node`, `objc`, `other`, `perl`, `php`, `powershell`, `python`,\n `ruby`",
174174
"type": "string"
175175
},
176176
"project_id": {

src/sentry/models/featureadoption.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
manager.add(12, "cfml", "CFML", "language")
4646
manager.add(13, "groovy", "Groovy", "language")
4747
manager.add(14, "csp", "CSP Reports", "language")
48+
manager.add(15, "powershell", "PowerShell", "language")
4849

4950
# Frameworks
5051
manager.add(20, "flask", "Flask", "integration", prerequisite=["python"])

src/sentry/models/project.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
"php",
122122
"php-laravel",
123123
"php-symfony",
124+
"powershell",
124125
"python",
125126
"python-aiohttp",
126127
"python-asgi",

src/sentry/utils/platform_categories.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"php-monolog",
8080
"php-symfony",
8181
"php",
82+
"powershell",
8283
"python",
8384
"python-aiohttp",
8485
"python-asgi",

src/sentry/utils/tag_normalization.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"sentry.objc",
3939
"sentry.perl",
4040
"sentry.php",
41+
"sentry.powershell",
4142
"sentry.python",
4243
"sentry.ruby",
4344
"sentry.rust",

0 commit comments

Comments
 (0)