Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: Event Type #2753

Merged
merged 70 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
1e5db1a
Event type WIP
szokeasaurusrex Feb 21, 2024
01d74ce
Merge branch 'master' into szokeasaurusrex/event-type
szokeasaurusrex Feb 27, 2024
8f06af8
Sort Event TypedDict keys
szokeasaurusrex Feb 27, 2024
524312a
Add some more keys, switch to class syntax
szokeasaurusrex Feb 27, 2024
3a9485f
Add `errors` key
szokeasaurusrex Feb 27, 2024
432fa27
Move `event_types` code to `_types`
szokeasaurusrex Feb 27, 2024
5d0ecf3
Add `request` key
szokeasaurusrex Feb 27, 2024
cda5591
Add breadcrumbs and user keys
szokeasaurusrex Feb 27, 2024
899b6d5
Fix `iter_event_frames` and `iter_event_stacktraces` typing
szokeasaurusrex Feb 27, 2024
3ec19ff
Added `exception`, `stacktrace`, `threads` types
szokeasaurusrex Feb 27, 2024
7b42284
Add required items to Event when generated
szokeasaurusrex Feb 27, 2024
411e9e7
Put required items first
szokeasaurusrex Feb 27, 2024
1ba2e93
more keys
szokeasaurusrex Feb 27, 2024
b772d54
measurements and _metrics_summary keys
szokeasaurusrex Feb 27, 2024
62d3c18
all event keys not required
szokeasaurusrex Mar 4, 2024
3bbc809
Revert "Add required items to Event when generated"
szokeasaurusrex Mar 4, 2024
adbf110
Fix capture_message typing
szokeasaurusrex Mar 4, 2024
aade728
Fix scope.py errors
szokeasaurusrex Mar 4, 2024
b9d6900
Fix tracing.py errors
szokeasaurusrex Mar 4, 2024
4626adc
Fix typing in client.py
szokeasaurusrex Mar 4, 2024
ce6a977
Fix `set_level` type
szokeasaurusrex Mar 4, 2024
9baa93a
Fix typing in logging integration
szokeasaurusrex Mar 4, 2024
cbb28d6
Fix checkin typing
szokeasaurusrex Mar 4, 2024
88be616
Use alternative `TypedDict` syntax
szokeasaurusrex Mar 8, 2024
8bda2f1
Remove future import
szokeasaurusrex Mar 8, 2024
1cc4497
Fix type errors
szokeasaurusrex Mar 8, 2024
0abf4d1
Fix wsgi typing
szokeasaurusrex Mar 8, 2024
e3783da
Fix modules integration typing
szokeasaurusrex Mar 8, 2024
64b3f78
Use `Any` type for expandable keys
szokeasaurusrex Mar 8, 2024
712dd46
GNU backtrace type fix
szokeasaurusrex Mar 8, 2024
03a54cf
fix types spark_worker
szokeasaurusrex Mar 8, 2024
cc20306
Fix _wsgi_common typing
szokeasaurusrex Mar 8, 2024
7eb0c15
Fix tornado typing
szokeasaurusrex Mar 8, 2024
6948eb3
Fix rq typing
szokeasaurusrex Mar 8, 2024
56c71e4
Fix aiohttp typing
szokeasaurusrex Mar 8, 2024
a93a5d2
fix pyramid typing
szokeasaurusrex Mar 8, 2024
9e2b5e2
fix types flask integration
szokeasaurusrex Mar 8, 2024
c6267fe
fix falcon integration typing
szokeasaurusrex Mar 8, 2024
91c99af
fix typing bottle
szokeasaurusrex Mar 8, 2024
aa93c5b
fix starlette typing
szokeasaurusrex Mar 8, 2024
bea4112
fix quart typing
szokeasaurusrex Mar 8, 2024
92f8c13
fix ariadne typing
szokeasaurusrex Mar 8, 2024
f585a70
fix django typing
szokeasaurusrex Mar 8, 2024
e979b8a
fix fastapi typing
szokeasaurusrex Mar 8, 2024
ab07457
fix graphene typing
szokeasaurusrex Mar 8, 2024
797e010
fix strawberry typing
szokeasaurusrex Mar 8, 2024
cc1341c
fix gql typing
szokeasaurusrex Mar 8, 2024
301bbf6
Handle span_processor type error
szokeasaurusrex Mar 8, 2024
06552aa
fix tornado typing
szokeasaurusrex Mar 8, 2024
03b423b
refactor strawberry.py so mypy understands it is type safe
szokeasaurusrex Mar 8, 2024
3174215
`rq.py` refactor for mypy to see type safety
szokeasaurusrex Mar 8, 2024
756f488
fix mypy in starlite.py
szokeasaurusrex Mar 8, 2024
cfd1b6f
Fix import that broke all tests
szokeasaurusrex Mar 8, 2024
e1fbd75
Fix 2.7
szokeasaurusrex Mar 8, 2024
1fffb30
Don't use LogLevelStr in code
szokeasaurusrex Mar 8, 2024
2a6d909
Don't use Literal and cast in code
szokeasaurusrex Mar 8, 2024
21a0250
Attempt to remove circular import
szokeasaurusrex Mar 8, 2024
52357ec
2nd attempt fix circular import
szokeasaurusrex Mar 8, 2024
ebed669
Fix circular import
szokeasaurusrex Mar 11, 2024
dc01e58
Merge branch 'master' into szokeasaurusrex/event-type
szokeasaurusrex Mar 11, 2024
19b20d1
Merge branch 'master' into szokeasaurusrex/event-type
szokeasaurusrex Mar 11, 2024
25a1a46
Check if profile is Profile
szokeasaurusrex Mar 11, 2024
e8f688a
Allow "critical" event level
szokeasaurusrex Mar 11, 2024
9bb882f
Merge branch 'master' into szokeasaurusrex/event-type
szokeasaurusrex Mar 11, 2024
01f5239
"start_timestamp" type
szokeasaurusrex Mar 12, 2024
5612f13
fix `contexts` typing
szokeasaurusrex Mar 12, 2024
6caa037
Remove unnecessary `capture_internal_exceptions`
szokeasaurusrex Mar 12, 2024
8e4b828
fix mypy
szokeasaurusrex Mar 12, 2024
f24557c
Merge branch 'master' into szokeasaurusrex/event-type
antonpirker Mar 12, 2024
c513394
Merge branch 'master' into szokeasaurusrex/event-type
szokeasaurusrex Mar 12, 2024
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
Prev Previous commit
Next Next commit
Add required items to Event when generated
  • Loading branch information
szokeasaurusrex committed Feb 27, 2024
commit 7b42284b7a742bfca816a685e353488a8a0cf8bd
5 changes: 1 addition & 4 deletions sentry_sdk/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from importlib import import_module
import os
import uuid
import random
import socket

Expand Down Expand Up @@ -594,11 +593,9 @@ def capture_event(

if hint is None:
hint = {}
event_id = event.get("event_id")
event_id = event["event_id"]
hint = dict(hint or ()) # type: Hint

if event_id is None:
event["event_id"] = event_id = uuid.uuid4().hex
if not self._should_capture(event, hint, scope):
return None

Expand Down
2 changes: 2 additions & 0 deletions sentry_sdk/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,8 @@ def finish(self, hub=None, end_timestamp=None):
"timestamp": self.timestamp,
"start_timestamp": self.start_timestamp,
"spans": finished_spans,
"platform": "python",
"event_id": uuid.uuid4().hex,
} # type: Event

if self._profile is not None and self._profile.valid():
Expand Down