Skip to content
This repository was archived by the owner on Dec 13, 2021. It is now read-only.

Misp 1294 update to sentry v1.0.0 #1

Open
wants to merge 329 commits into
base: master
Choose a base branch
from

Conversation

bryanfoley
Copy link

No description provided.

rhcarvalho and others added 30 commits June 26, 2020 20:03
…#740)

* fix(serialize): Do not attach stacktrace with empty frames

* do not attach None
This aligns the tracing implementation with the current JS
tracing implementation, up to a certain extent.

Hub.start_transaction or start_transaction are meant to be used when
starting transactions, replacing most uses of Hub.start_span /
start_span.

Spans are typically created from their parent transactions via
transaction.start_child, or start_span relying on the transaction being
in the current scope.

It is okay to start a transaction without a name and set it later.
Sometimes the proper name is not known until after the transaction has
started.

We could fail the transaction if it has no name when calling the finish
method. Instead, set a default name that will prompt users to give a
name to their transactions. This is the same behavior as implemented in
JS.

Span.continue_from_headers, Span.continue_from_environ,
Span.from_traceparent and the equivalent methods on Transaction always
return a Transaction and take kwargs to set attributes on the new
Transaction.

Rename Span.new_span to Span.start_child (and Transaction.start_child),
aligning with JS / tracing API spec. The old name is kept for backwards
compatibility.

Co-authored-by: Markus Unterwaditzer <markus@unterwaditzer.net>
This shrinks event sizes a bit, even when gzip'ed.
The compact representation is documented in the json module.

Alternatively, we can also look into using a custom encoder (that could
also handle datetime objects, instead of the current manual
serialization of those).

In the absence of proper benchmark data, consider a random transaction
event t:

>>> len(json.dumps(t)), len(json.dumps(t, separators=(',', ':')))
(82174, 78516)

That is 95.5% of the original size.

With gzip compression:

>>> len(gzips(json.dumps(t))), len(gzips(json.dumps(t, separators=(',', ':'))))
(13093, 12988)

That is 99.2% of the original size.
* feat(redis): Patch rediscluster if present

In addition to the redis and rb clients try to patch also the
rediscluster library which does not use the already patched clients.

* Add basic rediscluster tests
…t is fatal (getsentry#754)

Exceptions that are fatal but handled are probably log messages. Log messages are not really crashes. If we capture crashes as log messages only, we should fix that first by writing more integrations or fixing bugs in existing ones.
Pushing the scope has little value even for the one usecase it was designed for (cli apps), as those run in their own processes anyway.
getsentry#756)



Changes:

    Added a new wrapper decorator for post_init_error method to capture initialization error for AWS Lambda integration.
    Modified _wrap_handler decorator to include code which runs a parallel thread to capture timeout error.
    Modified _make_request_event_processor decorator to include execution duration as parameter.
    Added TimeoutThread class in utils.py which is useful to capture timeout error.
untitaker and others added 29 commits February 11, 2021 15:39
…ions (getsentry#1016)

* Added a test middleware function

* Added test that ensures __acall__ handles middleware functions correctly not only classes

* Added logic that handles the case where a middleware is a function rather a class

* fix: Formatting

* FIxing Mypy type errors

Co-authored-by: sentry-bot <markus+ghbot@sentry.io>
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/3.x/CHANGES)
- [Commits](sphinx-doc/sphinx@v3.4.0...v3.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bumps [checkouts/data-schemas](https://github.com/getsentry/sentry-data-schemas) from `76c6870` to `71cd4c1`.
- [Release notes](https://github.com/getsentry/sentry-data-schemas/releases)
- [Commits](getsentry/sentry-data-schemas@76c6870...71cd4c1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
…#1004)

* Moved logic from aws_lambda.py to aws_lambda.__init__

* Added init function that revokes original handler

* Added documentation

* fix: Formatting

* Added test definition for serverless no code instrumentation

* TODO comments

* Refactored AWSLambda Layer script and fixed missing dir bug

* Removed redunant line

* Organized import

* Moved build-aws-layer script to integrations/aws_lambda

* Added check if path fails

* Renamed script to have underscore rather than dashes

* Fixed naming change for calling script

* Tests to ensure lambda check does not fail existing tests

* Added dest abs path as an arg

* Testing init script

* Modifying tests to accomodate addtion of layer

* Added test that ensures serverless auto instrumentation works as expected

* Removed redundant test arg from sentry_sdk init in serverless init

* Removed redundant todo statement

* Refactored layer and function creation into its own function

* Linting fixes

* Linting fixes

* Moved scripts from within sdk to scripts dir

* Updated documentation

* Pinned dependency to fix CI issue

Co-authored-by: sentry-bot <markus+ghbot@sentry.io>
…init script + added traces_sample_rate (getsentry#1025)

* Added SENTRY_ prefix to serverless env variables and added traces sample rate env variable

* Linting reformat
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/3.x/CHANGES)
- [Commits](sphinx-doc/sphinx@v3.5.0...v3.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Auto enabled auto session tracking

* Moved auto_session_tracking outof expeirmental features and added it by default

* fix: Formatting

* Fixed type error

* Removed auto_session_tracking from from Experiment type

* Removed redundant default

* Auto detection of session mode when auto_session_tracking is enabled

* fix: Formatting

* Added test that ensures session mode is flips from applicatoin to request in WSGI handler

* New line at end of file

* Linting fixes

* Added default for session_mode in auto_session_tracking

* Added defaults to session_mode to Session class

* Fixed failing test due to changes in WSGI handler tracking requests:

* Reordered param to the end

* fix: Formatting

* Modified flask test to match request mode sessions

* Removed redundant typing Union

Co-authored-by: sentry-bot <markus+ghbot@sentry.io>
* Add test that ensreus transaction includes body data even if no exception was raised

* Removed weakref to request that was being gc before it was passed to event_processor

* fix: Formatting

* Linting fixes

Co-authored-by: sentry-bot <markus+ghbot@sentry.io>
…getsentry#1037)

* Passed django setting USE_X_FORWARDED_FOR to sentry wsgi middleware upon creation

* Linting changes

* Accessed settings attr correctly

* Added django tests for django setting of USE_X_FORWARDED_HOST and extracting the correct request url from it

* fix: Formatting

Co-authored-by: sentry-bot <markus+ghbot@sentry.io>
Co-authored-by: sentry-bot <markus+ghbot@sentry.io>
* Added Change log for major release 1.0.0

* Increased the timeout for tests in workflow

* Added entry to changelog in regards to worker fix
@bryanfoley bryanfoley marked this pull request as ready for review January 3, 2022 13:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.