profile
viewpoint
Armin Ronacher mitsuhiko Sentry Austria http://lucumr.pocoo.org/ Software developer and Open Source nut. Creator of the Flask framework. Engineering at @getsentry. Other things of interest: @pallets and @rust-lang

getlogbook/logbook 1387

A cool logging replacement for Python.

mitsuhiko/better-panic 298

A python inspired panic handler for rust

austrianredcross/stopp-corona-android 263

Android Source Code

austrianredcross/stopp-corona-ios 156

iOS Source Code

getsentry/rust-sourcemap 126

A library for rust that implements basic sourcemap handling

lektor/lektor-archive 125

A flat file content management system. Archived repository.

ericflo/hurricane 97

Hurricane is a project for easily creating Comet web applications.

mitsuhiko/bf3-aggregator 84

Sourcecode for the bf3 developer news aggregator.

mitsuhiko/badideas 61

Examples from my europython talk

fijal/quill 31

An attempt to create a better language

issue commentgetsentry/sentry

Bind releases to project instead of organization

We investigated it again if we can make releases project specific and unfortunately that breaks a lot of usecases that customers currently have. I would leave this issue open as a meta issue since we're aware of the shortcomings and are investigating what options we have that do not break existing workflows.

vitalets

comment created time in 14 hours

create barnchgetsentry/develop

branch : feature/clarify-deprecation-of-extra

created branch time in a day

issue commentgetsentry/relay

Sentry is not skipping dummy minidump from Unreal Linux

I think we should re-evaluate the unreal XML again. Last time I looked into it, it was mostly useless because it lacked build IDs but maybe we can make this work somewhat for such cases to get at least a basic stack trace.

ki11roy

comment created time in a day

push eventgetsentry/sentry

Armin Ronacher

commit sha 8f70647952db09e59e535f5cf2d71895bb0689a5

fix(grouping): Correctly handle case insensitivity on value (#21552)

view details

push time in 2 days

delete branch getsentry/sentry

delete branch : feature/case-insensitive-value

delete time in 2 days

PR merged getsentry/sentry

fix(grouping): Correctly handle case insensitivity on value

It's intended and documented to be case insensitive. It was incorrectly not handled as such.

+10 -10

0 comment

4 changed files

mitsuhiko

pr closed time in 2 days

push eventgetsentry/sentry

Armin Ronacher

commit sha 36de719c64ade42bd938c08da92ab8704e9c8290

fix: fix a similarity test

view details

push time in 2 days

create barnchgetsentry/sentry

branch : feature/case-insensitive-value

created branch time in 2 days

pull request commentgetsentry/sentry

ref(py3): Ensure JWT tokens are used as bytes in headers

Aren't headers latin1 unicode on Python3?

BYK

comment created time in 3 days

push eventgetsentry/sentry

Armin Ronacher

commit sha a33262b825e07bcaf4d1f2a08b09bdd3fe177b77

feat(grouping): Added ability to specify a custom title (#21297) * feat(grouping): Added ability to specify a custom title * test: Add a test that demonstrates that commas don't matter * feat: Feature flag custom titles * fix: bad merge

view details

push time in 4 days

delete branch getsentry/sentry

delete branch : feature/custom-title-preparation

delete time in 4 days

PR merged getsentry/sentry

feat(grouping): Added ability to specify a custom title

This adds support for specifying custom titles for events. Currently this feature is restricted to providing custom titles via fingerprinting rules but in future there might be other ways by which the same thing can be accomplished directly from SDKs. This change is done as part of user feedback where customers find it impossible to tell groups apart when custom fingerprinting rules are used which split events into groups where the split condition is not part of the UI rendering.

Implementation

The way this functions is that the metadata block of an event can now in general hold a title value. If this value exists, it's promoted into the title field on the event. The UI can detect a custom title by inspecting the title field in the metadata and decide to honor it if needed.

With this PR the promoting of the title only becomes visible within discover and notifications as the rest of the UI is not aware of custom titles yet.

Example Usage

This is an example from custom fingerprinting which splits by logger name:

logger:sentry.* -> log-message-{{ logger }}, title="Log Message from {{ logger }}"

Before if such a group was split it was hard to tell them apart as the logger is not prominently rendered. This now lets a user customize the title that is shown so that groups can be told apart. This becomes particularly useful when splits are done by tag.

+294 -130

1 comment

35 changed files

mitsuhiko

pr closed time in 4 days

push eventgetsentry/sentry

Armin Ronacher

commit sha 2b0391d46304f46c2cd33928ae0ba2aed0387575

fix: bad merge

view details

push time in 4 days

push eventgetsentry/sentry

Armin Ronacher

commit sha ea08a1d5ec1e5bfd8ac18e68a95339932098a48d

feat: Feature flag custom titles

view details

push time in 4 days

push eventgetsentry/sentry

Alberto Leal

commit sha bca9ab00de1bfaa8102cd980526d0bececb12ba3

feat(rum): Add CLS, TTFB, and Request Time measurements to Discover (#21309)

view details

Tony

commit sha 0fc2afc3b423b97dcfa49fde4aed7c37f69c6a5a

fix(rum): Add trailing slash to url (#21308)

view details

Billy Vong

commit sha 6f2c4d2985524e6738778310d09a883fdd067191

ref(gha): Change `migrations` workflow to use "setup" action (#21286) This changes the `migrations` workflow to use the `setup-sentry` action

view details

adhiraj

commit sha 074c17b96c90b6c45a89eb8afaa312b05eff057d

chore(alerts): Update first seen condition name (#21244) With the new UI the previous wording doesn't make as much sense

view details

Colleen O'Rourke

commit sha 09ba964934989af645231d9c1a9aa889a7e7b8b6

feat(Integrations): Add Datadog metrics to integration installation (#21317) * feat(Integration Installation): Add Datadog metrics to integration installation

view details

Priscila Oliveira

commit sha 2df685fd79d3dab163aa65c4207d7b8260f98f32

ref(ui): Refactor AnnotatedText component (#21320)

view details

Tony

commit sha 6888620dc8ce0d2640664b9ab9b79b54605e1529

fix(rum): Compute the true failure rate for web vitals (#21234) Currently the failure rate for web vitals is calculated using only what's visible on the histograms. This was confusing because when a zoom happens the failure rate will change with it. This change queries for the actual failure rate based on the query conditions independent of the visible histogram.

view details

Mark Story

commit sha 5f74dcd5871fc9a1c35c98ef74e2dc7bd7f0fa7e

fix(discover) Improve margins on Operation Breakdown (#21312) Fix missing gap between the heading and help icon.

view details

William Mak

commit sha 4d612cd1945bcc792400a61e9df40f62f7bb222e

feat(trends): Add moving average to trends (#21271) * feat(trends): Add moving average to trends - Trends will now use the same getInterval as discover but with high fidelity - Use moving average instead of high intervals to smooth the graphs, and show a low opacity version of the noisy old graph

view details

Mark Story

commit sha dabc5727518f3f60c1d16d88e5d4272941df7847

feat(discover) Add `error.unhandled` field to discover (#21256) Add the `error.unhandled` field to both filter conditions and result columns. This field is the inverse of `error.handled`. Customers often think in terms of unhandled errors and not handled ones. While these changes are entirely in the search interface layers, we may promote them to storage level if these new fields resonate well with customers.

view details

David Wang

commit sha f4d15fa6ce8a709ad81c06d48cb69e31d7b8936d

ref(ts): Convert IssueListTagFilter (#21313) * wip refactor to tsx, need to wait for sidebar changes * use new tagvalueloader type * comments

view details

Burak Yigit Kaya

commit sha 0e0b8ae01677a633239f4d607d9fe58334548576

ci(release): Remove unnecessary sleep btw prepare & publish (#21321) getsentry/craft#117 is merged and released and seems to work so no need for this `sleep 10` anymore.

view details

Mark Story

commit sha 46f06deffa09064045e3bbcbb2f45193b08d9756

feat(ui) Add echarts based stacked bar chart (#21264) Add an echarts based wrapper for replacing the StackedBarChart component. This will help normalize tooltips and colours used across charts. It also fixes some rendering issues with StackedBarChart where a small empty block is shown in all charts. I've not integrated the new component into any views yet as I wanted to get feedback on the design and API for this new component. Eventually I'd like to replace all of the StackedBarChart usage across the application with this component. Co-authored-by: Priscila Oliveira <priscilawebdev@gmail.com>

view details

Burak Yigit Kaya

commit sha 97795a0f754a57fe127b7c14e6a429ad06187675

fix(docker): Fix Docker lables for source and docs (#21332)

view details

Burak Yigit Kaya

commit sha dd56ab5caa4c0ee1ef2dbb6fc86012b4ab65093f

ref(gcb): Refactor how we test Py3 (#21329) With this PR, we now rely on the built-in `SENTRY_PYTHON3` env var support, introduced in getsentry/onpremise#702. This PR also refactors common env variable usages and centralizes them.

view details

Billy Vong

commit sha f4bd1df2339e59a520d641de3140e5b5ad6dff7d

ref(gha): Change `apidocstest` workflow to use "setup" action (#21288) This changes the `apidocstest` workflow to use the `setup` action that was added in https://github.com/getsentry/sentry/pull/21203/

view details

Colleen O'Rourke

commit sha 81a662b51cb645c28a7dcc3d77aed7ea5ec47bbe

fix(Integrations): Fix request installation modal text overflow (#21328)

view details

Evan Purkhiser

commit sha 3c0ada7cee2980145b98b096050c344cafaa7bf2

ref(py3): Bump email-reply-parser (#21333)

view details

Chris Fuller

commit sha bac8c6315c475f934fd7b84b7de981aa9c68e3ad

fix(workflow): Respect retention period during incident start/end calculation (#21330) * Adding retention period check when calculating incident start/end times * Adding retention period check when calculating incident start/end times * Adding retention period check when calculating incident start/end times * Adding retention period check when calculating incident start/end times * Adding retention period check when calculating incident start/end times * Adding retention period check when calculating incident start/end times * Testing tzinfo * Testing tzinfo * Testing tzinfo * Testing tzinfo * Fixing tzinfo * Fix test_windowed_capped_start Co-authored-by: Dan Fuller <dfuller@sentry.io>

view details

Evan Purkhiser

commit sha c14bcc571022e98ef716882b28ee8d29377bae72

test(backend): receivers.onboarding - stop raising for get_default_owner (#21338) This fixes a lot of exception output in tests

view details

push time in 4 days

push eventgetsentry/sentry

Armin Ronacher

commit sha 7554e797b35f0c3c4d0ffd1419746539163fe020

fix: make linter happy

view details

push time in 4 days

push eventgetsentry/sentry

Priscila Oliveira

commit sha 143ce3a594b17605b9e9c26d85bba1d500aed15f

ref(ts): Convert Overview to Ts (#21408)

view details

Matej Minar

commit sha 94ce7676a52712e0e5116e36844f79e352c0eeea

ref(ts): Convert suggestedOwnerHovercard to typescript (#21407)

view details

Matej Minar

commit sha 60e4ed2c486ca879604009b1613709cb8a4c47dd

ref(ts): Convert tagDistributionMeter to typescript (#21405)

view details

Kamil Ogórek

commit sha 433839bfbdd4e368e72b1bc301fabea58c81589d

feat: Use sentry-javascript 5.27.0-beta.0 with Sesssions support (#21435)

view details

Priscila Oliveira

commit sha f8891b0040ae73f24fcdebc78f9d8de332db6eba

ref(frames): Need indication in Issues UI that you can expand the frame (#21197)

view details

William Mak

commit sha 92059ce9681c39e94806a1bcb21ced66155ed3f3

fix(discover): Negated boolean like values (#21418) - These values were being caught by the boolean filter, but we weren't handling the operator correctly

view details

Tony

commit sha 81d0ee2e0fb2164613e5911915e2663f8d9b92af

feat(vitals): Add web vitals to transaction summary side bar (#21340) Add the number of vitals passed to the side bar in the transaction summary.

view details

Priscila Oliveira

commit sha 7ab7256c7169539ca5b5bb64ba27132c8031896e

ref(tags): Fix custom tags issue (#21281)

view details

Mark Story

commit sha 7180fb02671bfab8302a3f6918a6ef9cd181e3ed

ref(search) Remove unused code in saved searches (#21424) Earlier this week I added a warning to see if any customers are using the project level saved searches. It hasn't captured any data which means this code is safe to remove. I've slightly change the semantics on the project_group_index endpoint but I don't think that will matter much as that endpoint is also generally unused.

view details

Stephen Cefali

commit sha 38fd19809a4e49774ed95c1fd97560476d36b204

feat(slack): metric alerts async slack (#21311)

view details

Stephen Cefali

commit sha f02712454c442799502f8ec02d6eb73a6bea1137

ref(ts): convert ProjectPlugins to TS (#21428)

view details

Mark Story

commit sha 77c7d57edb4604d152e8c37e458f5bd8b314cc05

ref(charts) Update issue list chart to use echarts (#21414) This is the first of many changes around the application to replace StackedBarChart with an echarts based component. Using echarts more will help ensure visual uniformity of tooltips and hover states across the application. Add yAxis.max to provide historically consistent appearance for small datasets. Having a max of 10 on small datasets reduces the visual differences between the new charts and StackedBarChart.

view details

Stephen Cefali

commit sha b52fb09f5d224e66eb8ea75703891a4192e54a5a

ref(ts): convert plugin config to TS (#21425)

view details

David Cramer

commit sha fd23b902ad19f36a698efe4303c5073c8741c5d6

fix(deletions): Correct logout behavior to not overwrite user instance - Change logger name to sentry.deletions.api - Assert on is_active behavior - Only update session_nonce on logout

view details

Dan Fuller

commit sha 39d1c6f0d35a14e6fea6832c4418684ac67b20c7

fix(metric_alerts): Track pending incident snapshots that are ready to run. (#21429) This metric should only be pending snapshots that are ready to be run. We don't care if there's a backlog of snapshots in the future.

view details

Dan Fuller

commit sha 33f5955d2ecfe0e12b1adddea0edfe591c1dff92

feat(metric_alerts): Use SnubaQueryEventType when building query to send to snuba. (#21261) Instead of just assuming a default value for event.type based on dataset, we want to use the new `SnubaQueryEventType` model to generate these values. For backwards compatibility we still support auto assigning these based on dataset, but this will go away once we've migrated. Fixes WOR-331

view details

Billy Vong

commit sha aaa80187fea07e7b394e57abb8a2e109d9d89720

build(js): Update browserslist db (#21442) This updates the browserslist db which babel uses

view details

Burak Yigit Kaya

commit sha fb601d0cb514386311a9d3af80be87b639f97a90

ci(release): Ensure master branch when bumping dev version (#21439)

view details

Scott Cooper

commit sha 54286f8626677ac0e7a86e29bc428fac2612d310

ref(ui): Remove unused alert box css (#21419)

view details

Colleen O'Rourke

commit sha 1055b4f670ba5257c98cfb2fbd0f8f8ff3f30af0

ref(API docs): Add beforeSend link/blurb in user feedback docs (#21342) * ref(API docs): Add beforeSend link/blurb in user feedback docs

view details

push time in 4 days

push eventgetsentry/sentry

Armin Ronacher

commit sha 24d38e4e029571e3282374d528c9314535e8a569

Apply suggestions from code review Co-authored-by: Matej Minar <matej.minar@sentry.io>

view details

push time in 4 days

push eventgetsentry/sentry

Armin Ronacher

commit sha 46a821d6bfdee5e51b6900a9727ca72513bbd05e

feat: Add hint for rrweb json files

view details

push time in 4 days

push eventgetsentry/sentry

Armin Ronacher

commit sha fe62aebabe4e961d24e40ed57faed119369bfed6

ref: Added more attachment viewers and refactored code

view details

Armin Ronacher

commit sha 6d2d0bd91331183d7013d866d46b89092d4d1c20

feat: add support for json constants for context data

view details

push time in 4 days

push eventgetsentry/sentry

Armin Ronacher

commit sha 8570084775e5d7c7ffc44327c5c4050c9d426c3d

ref: Don't show preview button on group attachments list

view details

push time in 4 days

pull request commentgetsentry/sentry

feat(attachment): Add basic log viewer to attachments

So current situation is event attachment stuff does not lazy load. The ansicolor package is about 2KB large. We could lazy load it if we want, but I would need to rearrange code a bit for this to be nice. We do lazy load the rrweb player which is similar in nature.

mitsuhiko

comment created time in 4 days

push eventgetsentry/sentry-python

Armin Ronacher

commit sha 34d9d7307379933516e803fb9d76f590a00cc139

feat(attachments): Add basic support for attachments (#856)

view details

push time in 5 days

delete branch getsentry/sentry-python

delete branch : feature/attachments

delete time in 5 days

PR merged getsentry/sentry-python

feat(attachments): Add basic support for attachments

Initial work in progress support for attachments.

Example integration that uploads stdout/stderr as attachments is here: https://gist.github.com/mitsuhiko/16815c06341370c90030b520984e6ee2

+166 -51

5 comments

6 changed files

mitsuhiko

pr closed time in 5 days

push eventgetsentry/sentry-python

Armin Ronacher

commit sha 3749713e66a74367da0e03c665bc262b87ff3900

Update sentry_sdk/scope.py Co-authored-by: Philipp Hofmann <philipp.hofmann@sentry.io>

view details

push time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent

pull request commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

Basically what @untitaker said. This is how people do Python APIs :)

mitsuhiko

comment created time in 5 days

push eventgetsentry/sentry-python

Armin Ronacher

commit sha 7e747aad7168b8fa617c2f6a41c724e4be6960e8

Update sentry_sdk/scope.py Co-authored-by: Philipp Hofmann <philipp.hofmann@sentry.io>

view details

push time in 5 days

Pull request review commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

 def capture_event(         if session:             self._update_session_from_event(session, event) -        if event_opt.get("type") == "transaction":-            # Transactions should go to the /envelope/ endpoint.-            self.transport.capture_envelope(-                Envelope(-                    headers={-                        "event_id": event_opt["event_id"],-                        "sent_at": format_timestamp(datetime.utcnow()),-                    },-                    items=[-                        Item(payload=PayloadRef(json=event_opt), type="transaction"),-                    ],-                )+        attachments = hint.get("attachments")+        is_transaction = event_opt.get("type") == "transaction"++        if is_transaction or attachments:+            # Transactions or events with attachments should go to the

We currently don't have this for any feature. That said, we talked about something like this. Will take this to slack.

mitsuhiko

comment created time in 5 days

PullRequestReviewEvent

pull request commentgetsentry/sentry

feat(attachment): Add basic log viewer to attachments

@billyvg I'm not sure. Does it make a difference if it is?

mitsuhiko

comment created time in 6 days

pull request commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

@philipphofmann i think this is ready to merge.

mitsuhiko

comment created time in 6 days

pull request commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

@rhcarvalho what's blocking the merge of this?

mitsuhiko

comment created time in 6 days

push eventgetsentry/sentry-python

Daniel Griesser

commit sha cad0947c62759d2197a5d64a3545f0ab02540788

release: 0.19.1

view details

Katie Byers

commit sha b2badefc7dce6af6b2603ca24275b66e11f746f4

pin pytest-django version (#873)

view details

Markus Unterwaditzer

commit sha f0bbd04b5a581041456caa5214cb46e826ba8e4f

fix: Fix crash with Django 3.1 async views (#851) Co-authored-by: william chu <williamchu@uptickhq.com> Co-authored-by: sentry-bot <markus+ghbot@sentry.io>

view details

Markus Unterwaditzer

commit sha 34e61950551bd4332755d760d6a367a26e411abf

Merge release/0.19.1 into master

view details

Adam Johnson

commit sha 62ca43a4638ac6a2f4f8e7864275049894b13299

Add documentation and changelog links on PyPI (#859) These appear on the sidebar and provide neat, somewhat standard shortcuts to useful places. cf. [scout-apm](https://pypi.org/project/scout-apm/) , as defined in https://github.com/scoutapp/scout_apm_python/blob/631f2432f643d256ad5ab7ff6b8f7b95b14231f5/setup.py#L44

view details

Chillar Anand

commit sha c752e9f28d733b85ef7eb5616bc0c9871c848317

fix(django): Fix complex either url patterns in Django (#875)

view details

Armin Ronacher

commit sha d49a99bdae1b50f98dc247bd926b020868f07e6f

Merge branch 'master' into feature/attachments

view details

push time in 6 days

Pull request review commentgetsentry/sentry

feat(attachment): Add basic log viewer to attachments

 class EventAttachments extends React.Component<Props, State> {     }));   }; +  getInlineAttachmentRenderer(attachment: EventAttachment) {+    const contentType = attachment.headers['Content-Type'] || '';+    const mimeType = contentType.split(';')[0].trim();+    switch (mimeType) {+      case 'text/plain':+        return attachment.size > 0 ? LogFileViewer : undefined;

I was thinking maybe empty attachments do have some meaning in cases. But not sure. I would say the moment someone adds a new mime type we can see :D

mitsuhiko

comment created time in 6 days

PullRequestReviewEvent

push eventgetsentry/sentry

Armin Ronacher

commit sha 319e48ec82751489e3a744e1be118ff5bdff8769

Update src/sentry/static/sentry/app/components/events/logFileViewer.tsx Co-authored-by: Matej Minar <matej.minar@sentry.io>

view details

push time in 6 days

Pull request review commentgetsentry/sentry

feat(attachment): Add basic log viewer to attachments

 class EventAttachmentActions extends React.Component<Props> {     }   }; +  handlePreview() {+    const {onPreview, attachmentId} = this.props;+    if (onPreview) {+      onPreview(attachmentId);+    }+  }+   render() {-    const {url} = this.props;+    const {url, hasPreview} = this.props;      return (       <React.Fragment>+        <DownloadButton+          size="xsmall"+          disabled={!hasPreview}+          icon={<IconFilter size="xs" />}+          onClick={() => this.handlePreview()}+          title={t('View Attachment Inline')}+        >+          {t('View')}

Changed to that icon.

mitsuhiko

comment created time in 6 days

PullRequestReviewEvent

push eventgetsentry/sentry

Armin Ronacher

commit sha bf2c4cf961b59a4e72386903906cd41875e13e87

ref: typescriptify and changes to review

view details

Armin Ronacher

commit sha 3908bc5e4bdfdc96b10f5e167f1276c695d9ac55

feat: Added ANSI color support to logfile renderer

view details

Armin Ronacher

commit sha 488e24b887b873a97dba919c35dc62a7b1f8218a

ref: Make the UI around previews slightly better

view details

push time in 6 days

Pull request review commentgetsentry/sentry

feat(attachment): Add basic log viewer to attachments

 class EventAttachmentActions extends React.Component<Props> {     }   }; +  handlePreview() {+    const {onPreview, attachmentId} = this.props;+    if (onPreview) {+      onPreview(attachmentId);+    }+  }+   render() {-    const {url} = this.props;+    const {url, hasPreview} = this.props;      return (       <React.Fragment>+        <DownloadButton+          size="xsmall"+          disabled={!hasPreview}+          icon={<IconFilter size="xs" />}+          onClick={() => this.handlePreview()}+          title={t('View Attachment Inline')}+        >+          {t('View')}

Yeah, also the general icon should be replaced. I'm not sure which Icon fits here tbh.

mitsuhiko

comment created time in 7 days

PullRequestReviewEvent

pull request commentgetsentry/sentry

feat(attachment): Add basic log viewer to attachments

This is not intended for merging, mostly to get feedback. But I would like to see if we can ship something like this near term.

mitsuhiko

comment created time in 7 days

PR opened getsentry/sentry

feat(attachment): Add basic log viewer to attachments

This is an experimental change to show text based attachments inline.

+138 -19

0 comment

3 changed files

pr created time in 7 days

create barnchgetsentry/sentry

branch : feature/attachment-log-viewer

created branch time in 7 days

push eventgetsentry/sentry-python

Katie Byers

commit sha b2badefc7dce6af6b2603ca24275b66e11f746f4

pin pytest-django version (#873)

view details

push time in 8 days

delete branch getsentry/sentry-python

delete branch : kmclb-pin-django-pytest

delete time in 8 days

PR merged getsentry/sentry-python

fix(dev): Pin `pytest-django` version

The newest pytest-django drops support for older versions of python, django, and pytest. This should hopefully fix CI until we can think about upgrading.

+12 -1

0 comment

1 changed file

lobsterkatie

pr closed time in 8 days

PullRequestReviewEvent

push eventgetsentry/sentry-python

Armin Ronacher

commit sha a9e35f52e3cc34ed2bcd48be80bca7382b21c783

fix: lints

view details

push time in 8 days

Pull request review commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

+import os+import mimetypes++from sentry_sdk._types import MYPY+from sentry_sdk.envelope import Item, PayloadRef++if MYPY:+    from typing import Optional+++class Attachment(object):+    def __init__(+        self,+        bytes=None,  # type: Optional[bytes]+        filename=None,  # type: Optional[str]+        path=None,  # type: Optional[str]+        content_type=None,  # type: Optional[str]+        add_to_transactions=False,  # type: bool+    ):+        # type: (...) -> None+        if bytes is None and path is None:+            raise TypeError("path or raw bytes required for attachment")+        if filename is None and path is not None:+            filename = os.path.basename(path)+        if filename is None:+            raise TypeError("filename is required for attachment")

Going to stay with the current API.

mitsuhiko

comment created time in 8 days

PullRequestReviewEvent

push eventgetsentry/sentry-python

Katie Byers

commit sha 097e36d636091cac424cc639fcedec8619054cbc

fix(dev): Set VSCode Python path (#866) VSCode can't seem to resolve the env without this.

view details

Katie Byers

commit sha e873bdb071146b1fd31814ae5f742f6a4f7abe39

ref(tracing): Pre-`traces_sampler` documentation additions (#865) Comments and docstrings, expanded __repr__s for Span and Transaction, a few variable name changes. No behavior change.

view details

Armin Ronacher

commit sha cb96afce8b54217a251b7dec0f39febd28aa2b1b

feat: Automatically determine release and environment (#871)

view details

Armin Ronacher

commit sha ed0e15db544c392a7a1d6be973644a54f01c08a0

doc: Added changelog entry for automatic releases

view details

Armin Ronacher

commit sha 01152f3ca3ea4e02d90b96e1af3162859d51222c

Merge branch 'master' into feature/attachments

view details

push time in 8 days

push eventgetsentry/sentry-python

Armin Ronacher

commit sha ed0e15db544c392a7a1d6be973644a54f01c08a0

doc: Added changelog entry for automatic releases

view details

push time in 8 days

push eventgetsentry/sentry-python

Armin Ronacher

commit sha cb96afce8b54217a251b7dec0f39febd28aa2b1b

feat: Automatically determine release and environment (#871)

view details

push time in 8 days

delete branch getsentry/sentry-python

delete branch : feature/auto-release

delete time in 8 days

PR merged getsentry/sentry-python

feat: Automatically determine release and environment

This now reads git info and a bunch of environment variables to determine release information. It also defaults the env to production if a release is set.

+56 -2

0 comment

2 changed files

mitsuhiko

pr closed time in 8 days

push eventgetsentry/sentry-python

Armin Ronacher

commit sha 80638d0d0bae64ebd2e28df0e4838632c58bec24

fix: lint

view details

push time in 8 days

issue commentpallets/click

File argument mode r+t can't be atomic

Effectively this is working as intended. See also https://github.com/pallets/click/issues/357

mvolfik

comment created time in 8 days

push eventgetsentry/sentry-python

Armin Ronacher

commit sha 2c14b7771da5b17b95bc54c9fa12886d391af321

feat: Add support for bytes to be a callable

view details

push time in 8 days

push eventgetsentry/sentry-python

Markus Unterwaditzer

commit sha af163ff176b2c22952443dc5ec535aed98656fc2

test: Make tornado tests more lenient for 6.1b1

view details

dependabot-preview[bot]

commit sha 4de85f5406b6b7c4b59834a341cff6d45fffdfa1

build(deps): bump flake8 from 3.8.3 to 3.8.4 Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.8.3 to 3.8.4. - [Release notes](https://gitlab.com/pycqa/flake8/tags) - [Commits](https://gitlab.com/pycqa/flake8/compare/3.8.3...3.8.4) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

view details

dependabot-preview[bot]

commit sha 91c7a8fcb8e94b37e7dba74e66f7d0992f3cf145

build(deps): bump checkouts/data-schemas from `36c6664` to `b20959c` Bumps [checkouts/data-schemas](https://github.com/getsentry/sentry-data-schemas) from `36c6664` to `b20959c`. - [Release notes](https://github.com/getsentry/sentry-data-schemas/releases) - [Commits](https://github.com/getsentry/sentry-data-schemas/compare/36c6664435960c80a0bac61308e5b753a564c035...b20959cbb66ddde11224be5f5eb3b90286140826) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

view details

Katie Byers

commit sha a7f7e2ab140392b5c669fa69b6156c48fd156872

feat(test): Add `only` pytest marker (#852) This adds a pytest marker similar to `it.only` in jest.

view details

Daniel Griesser

commit sha 356ad6c9703ec4274fe964cf0cfb568712d9dfe8

feat: Auto enable integrations=true (#845) * feat: Auto enable integrations=true * fix: Formatting * ref: Remove experiments flag * fix: Formatting Co-authored-by: sentry-bot <markus+ghbot@sentry.io>

view details

Daniel Griesser

commit sha 2c1e25aa263043aea24c1973f0e7c826a73a2489

meta: Prepare 0.19.0

view details

Daniel Griesser

commit sha 6cdc4bed8e8606a9bb24a1ce32e0564db134fe8a

ref: Remove experiments for auto integrations

view details

Daniel Griesser

commit sha 584bfe29f76d754d4b50d6d7ab785cec368b2205

release: 0.19.0

view details

Daniel Griesser

commit sha d8c161fb289b44b5cd4b83d0bb31112031925713

Merge release/0.19.0 into master

view details

Katie Byers

commit sha b36c548f3762fd8928b09838d4ee6a19cb3833e1

ref(tests): Split up tracing tests (#857) No behavior changes, just movin' stuff around.

view details

shantanu73

commit sha e12a3506383ecb156ef6a702c0ad3e84488270cf

fix: Incorrect timeout warnings in AWS Lambda and GCP integrations (#854) 1) Added code to stop thread in aws_lambda.py & gcp.py. 2) Modified logic of run() function of class TimeoutThread to remove the dependency on time.sleep() and to stop the thread either when the original handler returns (by calling the stop method) or the timeout is reached, conditionally raising ServerlessTimeoutWarning. Co-authored-by: Shantanu Dhiman <shantanu.dhiman@calsoftinc.com> Co-authored-by: Rodolfo Carvalho <rodolfo.carvalho@sentry.io>

view details

Daniel Griesser

commit sha 9af0dc812c19babe0f33e8f7e7eb4041f654449d

fix: Import blinker check (#860) * fix: Import blinker check * fix: linter

view details

Daniel Griesser

commit sha a9ce3a6d61776a860c301d4ff759c6b06b3f76c0

prepare: 0.19.1

view details

Armin Ronacher

commit sha 7d809bad6ccb15bced489b122d3a6e7a3f02a329

Merge branch 'master' into feature/attachments

view details

push time in 8 days

PR opened getsentry/sentry-python

feat: Automatically determine release and environment

This now reads git info and a bunch of environment variables to determine release information. It also defaults the env to production if a release is set.

+55 -2

0 comment

2 changed files

pr created time in 9 days

push eventgetsentry/sentry-python

Armin Ronacher

commit sha d9104350d4f1a6dc088e7ffe50288ccee8401b98

feat: add more supported envvars

view details

push time in 9 days

create barnchgetsentry/sentry-python

branch : feature/auto-release

created branch time in 9 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

 def __copy__(self):         rv._span = self._span         rv._session = self._session         rv._force_auto_session_tracking = self._force_auto_session_tracking+        rv._attachments = list(self._attachments)

Going to leave as such for now.

mitsuhiko

comment created time in 11 days

PullRequestReviewEvent

Pull request review commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

 def clear_breadcrumbs(self):         """Clears breadcrumb buffer."""         self._breadcrumbs = deque()  # type: Deque[Breadcrumb] +    def add_attachment(

resolving as duplicate of the open conversation.

mitsuhiko

comment created time in 11 days

PullRequestReviewEvent

Pull request review commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

 def clear_breadcrumbs(self):         """Clears breadcrumb buffer."""         self._breadcrumbs = deque()  # type: Deque[Breadcrumb] +    def add_attachment(+        self,+        bytes=None,  # type: Optional[bytes]+        filename=None,  # type: Optional[str]+        path=None,  # type: Optional[str]+        content_type=None,  # type: Optional[str]+        add_to_transactions=False,  # type: bool+    ):+        # type: (...) -> None+        """Adds an attachment to future events sent."""+        self._attachments.append(+            Attachment(+                bytes=bytes,+                path=path,+                filename=filename,+                content_type=content_type,+                add_to_transactions=add_to_transactions,+            )+        )

Resolving as duplicate of the above conversation.

mitsuhiko

comment created time in 11 days

PullRequestReviewEvent

push eventgetsentry/sentry-python

Armin Ronacher

commit sha bbcc0fab07023df9b78475d0cbec10caac7a9127

test: Make bytes checks on envelopes explicit

view details

push time in 11 days

Pull request review commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

 def test_breadcrumbs(sentry_init, capture_events):     assert len(event["breadcrumbs"]["values"]) == 0  +def test_attachments(sentry_init, capture_envelopes):+    sentry_init()+    envelopes = capture_envelopes()++    this_file = os.path.abspath(__file__.rstrip("c"))++    with configure_scope() as scope:+        scope.add_attachment(bytes=b"Hello World!", filename="message.txt")+        scope.add_attachment(path=this_file)++    capture_exception(ValueError())++    (envelope,) = envelopes++    assert len(envelope.items) == 3+    assert envelope.get_event()["exception"] is not None++    attachments = [x for x in envelope.items if x.type == "attachment"]+    (message, pyfile) = attachments++    assert message.headers["filename"] == "message.txt"+    assert message.headers["type"] == "attachment"+    assert message.headers["content_type"] == "text/plain"+    assert message.payload.bytes == b"Hello World!"

FWIW the difference here was intentional in the test. I will make it explicit here.

mitsuhiko

comment created time in 11 days

PullRequestReviewEvent

Pull request review commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

+import os+import mimetypes++from sentry_sdk._types import MYPY+from sentry_sdk.envelope import Item, PayloadRef++if MYPY:+    from typing import Optional+++class Attachment(object):+    def __init__(+        self,+        bytes=None,  # type: Optional[bytes]+        filename=None,  # type: Optional[str]+        path=None,  # type: Optional[str]+        content_type=None,  # type: Optional[str]+        add_to_transactions=False,  # type: bool+    ):+        # type: (...) -> None+        if bytes is None and path is None:+            raise TypeError("path or raw bytes required for attachment")+        if filename is None and path is not None:+            filename = os.path.basename(path)+        if filename is None:+            raise TypeError("filename is required for attachment")

The main argument I think against conflating path and filename is that if it becomes the same, it's a dual responsibility for different things. path is the absolute path in OS native file format (bytes or unicode) where the file is read from and filename is the relative filename what the file is reported at for the UI (unicode only).

So for instance a not uncommon situation is that you are trying to attach a logfile that has a filename such as /var/log/application-log-20201010.logand you want to report it aslogfile.txt`.

And, out of curiosity, why does an envelope item has a slot for a filename instead of a full path?

Because that's what the file is reported at in the UI. We intentionally do not want to keep an entire file path there as it causes more complexities and does not solve a purpose for the user.

mitsuhiko

comment created time in 11 days

PullRequestReviewEvent

push eventgetsentry/sentry

Armin Ronacher

commit sha 3cc56ddd29a1198a21cf5351cd1580e045079c5f

test: Add a test that demonstrates that commas don't matter

view details

Dora

commit sha 8c5db866a825c0a6dbfcdac0cbef694e047d0d8a

cleaning up rum card (#21285) Co-authored-by: Dora Chan <dora.lchan@gmail.com>

view details

Michal Kuffa

commit sha dcedf2393d17bfc23fb79157519360cd4ed0f7ec

ref(splunk): Do not reraise 403 from splunk (#21299)

view details

Mark Story

commit sha dcbc43d419fd02eaa44eee8c85c8c684f95702c2

ref(ts) Convert SeenInfo to typescript (#21259)

view details

Robin Rendle

commit sha 48566fc7e53cfeedbe2bd23137cb3ccc9aa78279

fix(ui): fix Pill font-size (#21296) * fix(ui): fix Pill font-size * used theme font-size variables Co-authored-by: Robin Rendle <robin@erskinedesign.com>

view details

Alberto Leal

commit sha 8ccba271a7b3fe5110ae2b563da8ab37350272c3

feat: Use sentry-javascript 5.26.0 (#21302)

view details

Armin Ronacher

commit sha 6e652dffcf172ba9406b9fa61771ea68c9d7422e

fix(group): Fixed an issue where last_seen could be None (#21304)

view details

Tony

commit sha 5cfa66cb63c75708a39f7689f3cbd37f850fce73

feat(measurements): Allow measurements in Pxx shortcuts in discover (#21258) The Pxx shortcuts for percentiles now support an optional argument allowing for not just `transaction.duration`. This change exposes this ability to discover and allows users to create queries with fields like `p50(measurements.fcp)` to get the 50th percentile for fcp.

view details

Billy Vong

commit sha 721782163742a8fd3890f4489106f4f988e1c186

ref(gha): Fix pip cache and update to `actions/cache@v2` (#21295) Due to https://github.com/getsentry/sentry/pull/21203 - we are restoring pip cache *AFTER* we `pip install`. We need to temporarily refactor pip into its own action as we can not yet use other actions in composite actions. (Thanks for catching this @joshuarli) This also updates to `actions/cache@v2`.

view details

Armin Ronacher

commit sha 5ce775e13f26e3da004b41690303cfe61121156e

fix(csp): Correctly extract message for metadata in csp and co (#21298)

view details

Taylan Gocmen

commit sha 407bd549a380620b4b67afd11a8fbf37697378a9

ref(ts): Convert issueList/container to typescript (#21240) * convert container to tsx * const types * remove children from props * move function to mount

view details

Burak Yigit Kaya

commit sha bde53b94130520f4056f08dc1450307619a7f5e9

fix(pypi): Use oss@sentry.io for author_email (#21306) I don't think we monitor hello@sentry.io properly and even then, it is better to consolidate this under the oss@ group.

view details

Mark Story

commit sha f335c84e858229ea87f750dc8071ed1c283c05fb

fix(search) Fix boolean filter grammar (#21307) Cover case where a boolean filter is followed by a ) Fixes SENTRY-J3C

view details

Taylan Gocmen

commit sha 8cd349217e95e8012f2f7d9e1ba8bb54b6491679

ref(ts): Convert issueList/sidebar to typescript (#21293) * move file to tsx * [WIP] ref(ts): Convert issueList/sidebar to typescript * types on func calls * reorganizing types * no const types needed

view details

Burak Yigit Kaya

commit sha d702a8214cf0e80ccef334f5a6fcf72b7fbfd4b7

feat(beacon): Add Python version to Beacon data (#21305) This is to track our Py3 adoption in self-hosted

view details

Scott Cooper

commit sha ac908512666869d3c6d2289f4d3f7b4e597b9165

fix(alerts): Add metric alert rule aggregate flag (#21287)

view details

Alberto Leal

commit sha 9c0fc802dee311d2ca89b1b3e8e1fa281a95df43

feat(web-vitals): Rename "Real User Monitoring" to "Web Vitals" (#21310)

view details

Armin Ronacher

commit sha 91c21ac556fea4d6b84fbf5f531bbc2a7830bab3

Merge branch 'master' into feature/custom-title-preparation

view details

push time in 11 days

push eventgetsentry/sentry

Armin Ronacher

commit sha 5ce775e13f26e3da004b41690303cfe61121156e

fix(csp): Correctly extract message for metadata in csp and co (#21298)

view details

push time in 11 days

delete branch getsentry/sentry

delete branch : feature/fix-security-title

delete time in 11 days

PR merged getsentry/sentry

Reviewers
fix(csp): Correctly extract message for metadata in csp and co

In https://github.com/getsentry/relay/pull/558 and https://github.com/getsentry/sentry/pull/19794 the metadata extraction for CSP and security events broke. It no longer extracts message which breaks the UI for such security events.

This code reintroduces the message extractor, also hacks together some tests for metadata extraction and adds a workaround to the UI for the events that were ingested in a broken way in the meantime.

Because unfortunately security events only get normalized into log records in the ingest endpoint and not in the store normalizer, the tests cannot accurately test what is happening. This could be solved by moving the code into the store normalizer in relay.

+160 -49

1 comment

19 changed files

mitsuhiko

pr closed time in 11 days

Pull request review commentgetsentry/sentry

fix(csp): Correctly extract message for metadata in csp and co

 export function getTitle(event: Event | Group): EventTitle {     result.title = metadata.directive || '';     result.subtitle = metadata.uri || '';   } else if (type === 'expectct' || type === 'expectstaple' || type === 'hpkp') {-    result.title = metadata.message || '';+    // Due to a regression some reports did not have message persisted+    // (https://github.com/getsentry/sentry/pull/19794) so we need to fall+    // back to the computed title for these.

I let a note for myself. @matejminar and me have been talking about some refactoring on this entire title stuff for #21297.

mitsuhiko

comment created time in 11 days

PullRequestReviewEvent

push eventgetsentry/sentry

Armin Ronacher

commit sha 6e652dffcf172ba9406b9fa61771ea68c9d7422e

fix(group): Fixed an issue where last_seen could be None (#21304)

view details

push time in 11 days

delete branch getsentry/sentry

delete branch : feature/strict-last-seen

delete time in 11 days

push eventgetsentry/sentry-python

Armin Ronacher

commit sha 4e613164bf03a613777e825a8da8907a5b8129b7

fix: lints

view details

push time in 11 days

pull request commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

Lots of comments, no approvals. Who can sign off on this?

mitsuhiko

comment created time in 11 days

Pull request review commentgetsentry/sentry-python

feat(attachments): Add basic support for attachments

 def clear_breadcrumbs(self):         """Clears breadcrumb buffer."""         self._breadcrumbs = deque()  # type: Deque[Breadcrumb] +    def add_attachment(

Going to resolve this then.

mitsuhiko

comment created time in 11 days

PullRequestReviewEvent

PR opened getsentry/sentry

fix(group): Fixed an issue where last_seen could be None

Fixes SENTRY-HZN

+3 -1

0 comment

1 changed file

pr created time in 11 days

create barnchgetsentry/sentry

branch : feature/strict-last-seen

created branch time in 11 days

PullRequestReviewEvent

PR opened getsentry/sentry

fix(csp): Correctly extract message for metadata in csp and co

In https://github.com/getsentry/relay/pull/558 and https://github.com/getsentry/sentry/pull/19794 the metadata extraction for CSP and security events broke. It no longer extracts message which breaks the UI for such security events.

This code reintroduces the message extractor, also hacks together some tests for metadata extraction and adds a workaround to the UI for the events that were ingested in a broken way in the meantime.

Because unfortunately security events only get normalized into log records in the ingest endpoint and not in the store normalizer, the tests cannot accurately test what is happening. This could be solved by moving the code into the store normalizer in relay.

+160 -49

0 comment

19 changed files

pr created time in 12 days

create barnchgetsentry/sentry

branch : feature/fix-security-title

created branch time in 12 days

PR opened getsentry/sentry

feat(grouping): Added ability to specify a custom title

This adds support for specifying custom titles for events. Currently this feature is restricted to providing custom titles via fingerprinting rules but in future there might be other ways by which the same thing can be accomplished directly from SDKs. This change is done as part of user feedback where customers find it impossible to tell groups apart when custom fingerprinting rules are used which split events into groups where the split condition is not part of the UI rendering.

Implementation

The way this functions is that the metadata block of an event can now in general hold a title value. If this value exists, it's promoted into the title field on the event. The UI can detect a custom title by inspecting the title field in the metadata and decide to honor it if needed.

With this PR the promoting of the title only becomes visible within discover and notifications as the rest of the UI is not aware of custom titles yet.

Example Usage

This is an example from custom fingerprinting which splits by logger name:

logger:sentry.* -> log-message-{{ logger }}, title="Log Message from {{ logger }}"

Before if such a group was split it was hard to tell them apart as the logger is not prominently rendered. This now lets a user customize the title that is shown so that groups can be told apart. This becomes particularly useful when splits are done by tag.

+284 -127

0 comment

32 changed files

pr created time in 12 days

more