Skip to content

Commit

Permalink
Updated Apidocs (#2397)
Browse files Browse the repository at this point in the history
* Updated apidocs to include user facing api and the most used classes
  • Loading branch information
antonpirker authored Sep 28, 2023
1 parent f35adf3 commit 692c0e9
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 11 deletions.
60 changes: 49 additions & 11 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,53 @@
========
Main API
========
=============
Top Level API
=============

.. inherited-members necessary because of hack for Client and init methods
This is the user facing API of the SDK. It's exposed as ``sentry_sdk``.
With this API you can implement a custom performance monitoring or error reporting solution.

.. automodule:: sentry_sdk
:members:
:inherited-members:

.. autoclass:: sentry_sdk.tracing.Span
:members:
Capturing Data
==============

.. autoclass:: sentry_sdk.tracing.Transaction
:members:
.. autofunction:: sentry_sdk.api.capture_event
.. autofunction:: sentry_sdk.api.capture_exception
.. autofunction:: sentry_sdk.api.capture_message


Enriching Events
================

.. autofunction:: sentry_sdk.api.add_breadcrumb
.. autofunction:: sentry_sdk.api.set_context
.. autofunction:: sentry_sdk.api.set_extra
.. autofunction:: sentry_sdk.api.set_level
.. autofunction:: sentry_sdk.api.set_tag
.. autofunction:: sentry_sdk.api.set_user


Performance Monitoring
======================

.. autofunction:: sentry_sdk.api.continue_trace
.. autofunction:: sentry_sdk.api.get_current_span
.. autofunction:: sentry_sdk.api.start_span
.. autofunction:: sentry_sdk.api.start_transaction


Distributed Tracing
===================

.. autofunction:: sentry_sdk.api.get_baggage
.. autofunction:: sentry_sdk.api.get_traceparent


Managing Scope (advanced)
=========================

.. autofunction:: sentry_sdk.api.configure_scope
.. autofunction:: sentry_sdk.api.push_scope


.. Not documented (On purpose. Not sure if anyone should use those)
.. last_event_id()
.. flush()
45 changes: 45 additions & 0 deletions docs/apidocs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
========
API Docs
========

.. autoclass:: sentry_sdk.Hub
:members:

.. autoclass:: sentry_sdk.Scope
:members:

.. autoclass:: sentry_sdk.Client
:members:

.. autoclass:: sentry_sdk.Transport
:members:

.. autoclass:: sentry_sdk.HttpTransport
:members:

.. autoclass:: sentry_sdk.tracing.Transaction
:members:

.. autoclass:: sentry_sdk.tracing.Span
:members:

.. autoclass:: sentry_sdk.profiler.Profile
:members:

.. autoclass:: sentry_sdk.session.Session
:members:

.. autoclass:: sentry_sdk.attachments.Attachment
:members:

.. autoclass:: sentry_sdk.scrubber.EventScrubber
:members:

.. autoclass:: sentry_sdk.monitor.Monitor
:members:

.. autoclass:: sentry_sdk.envelope.Envelope
:members:

.. autoclass:: sentry_sdk.envelope.Item
:members:
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ visit the `GitHub repository <https://github.com/getsentry/sentry-python>`_.
.. toctree::
api
integrations
apidocs
2 changes: 2 additions & 0 deletions docs/integrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Integrations
============

TBD

Logging
=======

Expand Down

0 comments on commit 692c0e9

Please sign in to comment.