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

SDK 2.0 #2670

Closed
wants to merge 52 commits into from
Closed

SDK 2.0 #2670

wants to merge 52 commits into from

Commits on Dec 13, 2023

  1. Configuration menu
    Copy the full SHA
    89af1e2 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2024

  1. Sync with master (#2596)

    sentrivana authored Jan 9, 2024
    Configuration menu
    Copy the full SHA
    b83e454 View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2024

  1. Configuration menu
    Copy the full SHA
    8dddcf1 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2024

  1. Drop Python 2.7, 3.5 from CI (#2640)

    - remove special treatment for Python 2.7 from CI YAML generating
    - remove Python 2.7, 3.5 test environments from `tox.ini`
    sentrivana authored Jan 16, 2024
    Configuration menu
    Copy the full SHA
    9703685 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ec5b85a View commit details
    Browse the repository at this point in the history
  3. Remove # coding: utf-8 (#2641)

    UTF-8 is the default in Python 3.
    sentrivana authored Jan 16, 2024
    Configuration menu
    Copy the full SHA
    410dba1 View commit details
    Browse the repository at this point in the history
  4. Remove compatibility utils for old Python (#2645)

    Remove Python<=3.5 compatibility utils from `_compat.py`.
    
    ---------
    
    Co-authored-by: Daniel Szoke <[email protected]>
    sentrivana and szokeasaurusrex authored Jan 16, 2024
    Configuration menu
    Copy the full SHA
    2d354c7 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2024

  1. Configuration menu
    Copy the full SHA
    999c238 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    db2bd4b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bb1c3ff View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6ec6973 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. Configuration menu
    Copy the full SHA
    8eaaece View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ce549ca View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2024

  1. Consolidate tracing_utils (#2655)

    - Remove tracing_utils_py2.py, move the contents of tracing_utils_py3.py to tracing_utils. Some code reorganization was needed to avoid circular imports.
    - Move the contents of test_decorator_sync.py and test_decorator_async_py3.py to a new file, test_decorator.py, and remove the original files.
    sentrivana authored Jan 22, 2024
    Configuration menu
    Copy the full SHA
    4673548 View commit details
    Browse the repository at this point in the history
  2. Remove Python<=3.5 compatibility code from tests (#2649)

    - remove py<=3.5 specific imports
    - remove test markers for skipping/xfailing tests on py<=3.5
    sentrivana authored Jan 22, 2024
    Configuration menu
    Copy the full SHA
    9561fff View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Configuration menu
    Copy the full SHA
    e2dd1f6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5ed5781 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. Configuration menu
    Copy the full SHA
    ef3f691 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2024

  1. Configuration menu
    Copy the full SHA
    d600037 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. Configuration menu
    Copy the full SHA
    2452113 View commit details
    Browse the repository at this point in the history
  2. Remove deprecated code (#2666)

    * remove deprecated client options
    * remove .install()
    * remove new_span
    sentrivana authored Jan 29, 2024
    Configuration menu
    Copy the full SHA
    cb2c70f View commit details
    Browse the repository at this point in the history
  3. ref(api): Remove store endpoint (#2656)

    ## Summary
    
    This change removes all usages of the deprecated `store` endpoint from the Python SDK. From now on, events that were previously sent to the `store` endpoint will now be sent as envelopes to the `envelope` endpoint. 
    
    
    ## Breaking API changes
    
      - `sentry_sdk.transport.Transport` is now an abstract base class, and therefore, it cannot be instantiated directly. Subclasses must implement the `capture_envelope` method.
      - `sentry_sdk.utils.Auth.store_api_url` has been removed.
      - `sentry_sdk.utils.Auth.get_api_url`'s now accepts a `sentry_sdk.consts.EndpointType` enum instead of a string as its only parameter. Supplying this parameter is currently unnecessary, since the parameter's default value is the only possible `sentry_sdk.consts.EndpointType` value.
    
    
    ## Backwards-compatible API changes
      - `sentry_sdk.transport.Transport.capture_event` has been deprecated. Please use `sentry_sdk.transport.Transport.capture_envelope`, instead.
      - Passing a function to `sentry_sdk.init`'s `transport` keyword argument has been deprecated. If you wish to provide a custom transport, please pass a `sentry_sdk.transport.Transport` instance or a subclass.
    
    
    ## Other changes
      - `sentry_sdk.transport.HttpTransport._send_event` has been removed, and uses of this method have been removed from the codebase, including from tests.
      - Cleaned up some transport-related test code
    
    _________________________
    
    
    * Remove store endpoint
    
    * Fix linter error
    
    * Add stacklevel to warn call
    
    * Remove `store_api_url` test, update `get_api_url` test
    
    * Fix mypy
    
    * Correct import
    
    * Use `Enum` instead of `StrEnum`
    
    * Update `envelope.py`
    
    * Remove `Envelope.events` calls
    
    * Fix `capture_events_forksafe`
    
    * Hopefully fix circular import
    
    * Manually set TestTransport
    
    * Fix circular import
    
    * Revert "Fix circular import"
    
    This reverts commit e681bdb.
    
    * Revert "Hopefully fix circular import"
    
    This reverts commit 7105849.
    
    * Move EndpointType to top of file
    
    * Fix AWS tests
    
    * Remove TODO comment
    
    * Undo ABC change
    I will make a separate PR for this
    
    * Update
    
    * Rename envelope_item to envelope_items
    
    * Remove unneeded import statement
    
    * Updated migration guide
    
    * Put back `has_tracing_enabled` check
    
    * Remove test for replay context
    
    * Update MIGRATION_GUIDE.md
    
    * Auto-enable more integrations (#2671)
    
    * Remove deprecated code (#2666)
    
    * remove deprecated client options
    * remove .install()
    * remove new_span
    
    
    Fixes GH-1957
    
    ---------
    
    Co-authored-by: Ivana Kellyerova <[email protected]>
    szokeasaurusrex and sentrivana authored Jan 29, 2024
    Configuration menu
    Copy the full SHA
    ddb4a29 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. Configuration menu
    Copy the full SHA
    ec18401 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. Update MIGRATION_GUIDE.md

    Pyramid integration update
    antonpirker authored Feb 6, 2024
    Configuration menu
    Copy the full SHA
    ee66058 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    18ae737 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    98499e4 View commit details
    Browse the repository at this point in the history
  4. Typo

    antonpirker authored Feb 6, 2024
    Configuration menu
    Copy the full SHA
    9835963 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2f95d03 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2024

  1. Sync with master

    sentrivana committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    6cd6e77 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. Configuration menu
    Copy the full SHA
    04bcf91 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. Remove user.segment (#2726)

    sentrivana authored Feb 13, 2024
    Configuration menu
    Copy the full SHA
    cd8c5e0 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. Configuration menu
    Copy the full SHA
    d30d52d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1f33e1f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6d77ea7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    80ec86d View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. Configuration menu
    Copy the full SHA
    adb9d3e View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2024

  1. Configuration menu
    Copy the full SHA
    fa24e49 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e7161eb View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2024

  1. Configuration menu
    Copy the full SHA
    93f89e0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7b062ee View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cb052dd View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. Configuration menu
    Copy the full SHA
    f97c949 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fc38343 View commit details
    Browse the repository at this point in the history
  3. Remove PY2

    sentrivana committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    8aa9599 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2024

  1. Configuration menu
    Copy the full SHA
    888ee4c View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2024

  1. Scope refactoring (merge Hubs and Scopes) (#2610)

    This refactors the SDK to move away from the Hub and have all the functionality in the Scope. Introducing different types of scopes. This aligns the SDK with how Opentelementry (OTel) handles data bringing us closer to be 100% OTel compatible.
    
    This change was discussed in this RFC: 
    getsentry/rfcs#122
    
    There is also a small FAQ: 
    https://gist.github.com/mitsuhiko/1bc78d04ea7d08e5b50d27e42676db80
    
    And a Miro board showing how the new scopes manage data: 
    https://miro.com/app/board/uXjVNtPiOfI=/?share_link_id=216270218892
    
    ### This RP contains
    - Introduction of global, isolation, and current scope
    - Deprecation of the Hub
    - All existing Hub based API still works and is still used by most of our integrations. Under the hood the new Scopes are used.
    - (this PR now includes all the changes made in the [first PR](#2609) introducing the new API)
    
    ### Breaking changes
    - The Pyramid integration will not capture errors that might happen in `authenticated_userid()` in a custom `AuthenticationPolicy` class.
    - The parameter `propagate_hub` in `ThreadingIntegration()` was deprecated and renamed to `propagate_scope`.
    antonpirker authored Feb 26, 2024
    Configuration menu
    Copy the full SHA
    656ac9d View commit details
    Browse the repository at this point in the history
  2. ref(api): Abstract base classes (#2667)

    We have some classes in the SDK that essentially function as abstract classes, since they have some methods that raise NotImplementedError when called, since they are intended to be overriden by a subclass. Now that all supported Python versions support abstract base classes (ABCs), we should refactor these classes to be ABCs. Making this change will explicitly indicate which methods need to be overridden by a subclass.
    
    Changing a public class into an ABC is a breaking change, since instantiating the class, or any subclass that hasn't overridden all abstract methods, will raise an error. Therefore, I have added this (draft) PR to the SDK 2.0 milestone.
    
    * Convert `Transport` class into an ABC
    
    * ABC metrics
    
    * ABC scheduler
    
    * ABC integration
    
    * RequestExtractor comment
    
    * Deprecate `stop_profiling` and stop calling it
    
    This change is required because otherwise, the linter complains about the `stop_profiling` being an empty concrete method in an abstract class.
    
    * Actually, let's remove `stop_profiling`
    
    * Add ABCs to migration guide
    
    * fix mypy
    
    * Make docstring more relevant to users
    
    * `ensure_running` no longer abstract
    
    * Fix mypy
    szokeasaurusrex authored Feb 26, 2024
    Configuration menu
    Copy the full SHA
    eca23b8 View commit details
    Browse the repository at this point in the history
  3. Updated migration guide

    antonpirker committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    ad4ff19 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c2825d5 View commit details
    Browse the repository at this point in the history
  5. Added note to README

    antonpirker committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    cdf4f90 View commit details
    Browse the repository at this point in the history
  6. channel link

    antonpirker committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    0594cfa View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fa5f50b View commit details
    Browse the repository at this point in the history