Skip to content

Commit

Permalink
craft(gh-pages): update, version "1.26.0"
Browse files Browse the repository at this point in the history
  • Loading branch information
getsentry-bot committed Jun 22, 2023
1 parent a762d3f commit 53a8ad2
Show file tree
Hide file tree
Showing 19 changed files with 462 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 59bcb521f2bfcf231bbd71b348f90fe5
config: aeba9ada7d5e873395fb7b97237b6e3e
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified .doctrees/api.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; sentry-python 1.25.1 documentation</title>
<title>Overview: module code &#8212; sentry-python 1.26.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
Expand Down
67 changes: 62 additions & 5 deletions _modules/sentry_sdk/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>sentry_sdk.api &#8212; sentry-python 1.25.1 documentation</title>
<title>sentry_sdk.api &#8212; sentry-python 1.26.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
Expand All @@ -31,11 +31,14 @@
<h1>Source code for sentry_sdk.api</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">inspect</span>

<span class="kn">from</span> <span class="nn">sentry_sdk._types</span> <span class="kn">import</span> <span class="n">TYPE_CHECKING</span>
<span class="kn">from</span> <span class="nn">sentry_sdk.hub</span> <span class="kn">import</span> <span class="n">Hub</span>
<span class="kn">from</span> <span class="nn">sentry_sdk.scope</span> <span class="kn">import</span> <span class="n">Scope</span>

<span class="kn">from</span> <span class="nn">sentry_sdk._types</span> <span class="kn">import</span> <span class="n">TYPE_CHECKING</span>
<span class="kn">from</span> <span class="nn">sentry_sdk.tracing</span> <span class="kn">import</span> <span class="n">NoOpSpan</span>
<span class="kn">from</span> <span class="nn">sentry_sdk.tracing</span> <span class="kn">import</span> <span class="n">NoOpSpan</span><span class="p">,</span> <span class="n">Transaction</span>
<span class="kn">from</span> <span class="nn">sentry_sdk.tracing_utils</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">has_tracing_enabled</span><span class="p">,</span>
<span class="n">normalize_incoming_data</span><span class="p">,</span>
<span class="p">)</span>

<span class="k">if</span> <span class="n">TYPE_CHECKING</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span>
Expand All @@ -55,7 +58,7 @@ <h1>Source code for sentry_sdk.api</h1><div class="highlight"><pre>
<span class="n">ExcInfo</span><span class="p">,</span>
<span class="n">MeasurementUnit</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">sentry_sdk.tracing</span> <span class="kn">import</span> <span class="n">Span</span><span class="p">,</span> <span class="n">Transaction</span>
<span class="kn">from</span> <span class="nn">sentry_sdk.tracing</span> <span class="kn">import</span> <span class="n">Span</span>

<span class="n">T</span> <span class="o">=</span> <span class="n">TypeVar</span><span class="p">(</span><span class="s2">&quot;T&quot;</span><span class="p">)</span>
<span class="n">F</span> <span class="o">=</span> <span class="n">TypeVar</span><span class="p">(</span><span class="s2">&quot;F&quot;</span><span class="p">,</span> <span class="n">bound</span><span class="o">=</span><span class="n">Callable</span><span class="p">[</span><span class="o">...</span><span class="p">,</span> <span class="n">Any</span><span class="p">])</span>
Expand Down Expand Up @@ -85,6 +88,9 @@ <h1>Source code for sentry_sdk.api</h1><div class="highlight"><pre>
<span class="s2">&quot;set_level&quot;</span><span class="p">,</span>
<span class="s2">&quot;set_measurement&quot;</span><span class="p">,</span>
<span class="s2">&quot;get_current_span&quot;</span><span class="p">,</span>
<span class="s2">&quot;get_traceparent&quot;</span><span class="p">,</span>
<span class="s2">&quot;get_baggage&quot;</span><span class="p">,</span>
<span class="s2">&quot;continue_trace&quot;</span><span class="p">,</span>
<span class="p">]</span>


Expand Down Expand Up @@ -272,6 +278,57 @@ <h1>Source code for sentry_sdk.api</h1><div class="highlight"><pre>

<span class="n">current_span</span> <span class="o">=</span> <span class="n">hub</span><span class="o">.</span><span class="n">scope</span><span class="o">.</span><span class="n">span</span>
<span class="k">return</span> <span class="n">current_span</span></div>


<div class="viewcode-block" id="get_traceparent"><a class="viewcode-back" href="../../api.html#sentry_sdk.get_traceparent">[docs]</a><span class="k">def</span> <span class="nf">get_traceparent</span><span class="p">():</span>
<span class="c1"># type: () -&gt; Optional[str]</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns the traceparent either from the active span or from the scope.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">hub</span> <span class="o">=</span> <span class="n">Hub</span><span class="o">.</span><span class="n">current</span>
<span class="k">if</span> <span class="n">hub</span><span class="o">.</span><span class="n">client</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="n">has_tracing_enabled</span><span class="p">(</span><span class="n">hub</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">options</span><span class="p">)</span> <span class="ow">and</span> <span class="n">hub</span><span class="o">.</span><span class="n">scope</span><span class="o">.</span><span class="n">span</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="n">hub</span><span class="o">.</span><span class="n">scope</span><span class="o">.</span><span class="n">span</span><span class="o">.</span><span class="n">to_traceparent</span><span class="p">()</span>

<span class="k">return</span> <span class="n">hub</span><span class="o">.</span><span class="n">scope</span><span class="o">.</span><span class="n">get_traceparent</span><span class="p">()</span></div>


<div class="viewcode-block" id="get_baggage"><a class="viewcode-back" href="../../api.html#sentry_sdk.get_baggage">[docs]</a><span class="k">def</span> <span class="nf">get_baggage</span><span class="p">():</span>
<span class="c1"># type: () -&gt; Optional[str]</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns Baggage either from the active span or from the scope.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">hub</span> <span class="o">=</span> <span class="n">Hub</span><span class="o">.</span><span class="n">current</span>
<span class="k">if</span> <span class="p">(</span>
<span class="n">hub</span><span class="o">.</span><span class="n">client</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
<span class="ow">and</span> <span class="n">has_tracing_enabled</span><span class="p">(</span><span class="n">hub</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">options</span><span class="p">)</span>
<span class="ow">and</span> <span class="n">hub</span><span class="o">.</span><span class="n">scope</span><span class="o">.</span><span class="n">span</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
<span class="p">):</span>
<span class="n">baggage</span> <span class="o">=</span> <span class="n">hub</span><span class="o">.</span><span class="n">scope</span><span class="o">.</span><span class="n">span</span><span class="o">.</span><span class="n">to_baggage</span><span class="p">()</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">baggage</span> <span class="o">=</span> <span class="n">hub</span><span class="o">.</span><span class="n">scope</span><span class="o">.</span><span class="n">get_baggage</span><span class="p">()</span>

<span class="k">if</span> <span class="n">baggage</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="n">baggage</span><span class="o">.</span><span class="n">serialize</span><span class="p">()</span>

<span class="k">return</span> <span class="kc">None</span></div>


<div class="viewcode-block" id="continue_trace"><a class="viewcode-back" href="../../api.html#sentry_sdk.continue_trace">[docs]</a><span class="k">def</span> <span class="nf">continue_trace</span><span class="p">(</span><span class="n">environ_or_headers</span><span class="p">,</span> <span class="n">op</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">source</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="c1"># type: (Dict[str, Any], Optional[str], Optional[str], Optional[str]) -&gt; Transaction</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Sets the propagation context from environment or headers and returns a transaction.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">with</span> <span class="n">Hub</span><span class="o">.</span><span class="n">current</span><span class="o">.</span><span class="n">configure_scope</span><span class="p">()</span> <span class="k">as</span> <span class="n">scope</span><span class="p">:</span>
<span class="n">scope</span><span class="o">.</span><span class="n">generate_propagation_context</span><span class="p">(</span><span class="n">environ_or_headers</span><span class="p">)</span>

<span class="n">transaction</span> <span class="o">=</span> <span class="n">Transaction</span><span class="o">.</span><span class="n">continue_from_headers</span><span class="p">(</span>
<span class="n">normalize_incoming_data</span><span class="p">(</span><span class="n">environ_or_headers</span><span class="p">),</span>
<span class="n">op</span><span class="o">=</span><span class="n">op</span><span class="p">,</span>
<span class="n">name</span><span class="o">=</span><span class="n">name</span><span class="p">,</span>
<span class="n">source</span><span class="o">=</span><span class="n">source</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">transaction</span></div>
</pre></div>

</div>
Expand Down
11 changes: 4 additions & 7 deletions _modules/sentry_sdk/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>sentry_sdk.client &#8212; sentry-python 1.25.1 documentation</title>
<title>sentry_sdk.client &#8212; sentry-python 1.26.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
Expand Down Expand Up @@ -293,7 +293,7 @@ <h1>Source code for sentry_sdk.client</h1><div class="highlight"><pre>

<span class="k">if</span> <span class="n">scope</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">is_transaction</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;type&quot;</span><span class="p">)</span> <span class="o">==</span> <span class="s2">&quot;transaction&quot;</span>
<span class="n">event_</span> <span class="o">=</span> <span class="n">scope</span><span class="o">.</span><span class="n">apply_to_event</span><span class="p">(</span><span class="n">event</span><span class="p">,</span> <span class="n">hint</span><span class="p">)</span>
<span class="n">event_</span> <span class="o">=</span> <span class="n">scope</span><span class="o">.</span><span class="n">apply_to_event</span><span class="p">(</span><span class="n">event</span><span class="p">,</span> <span class="n">hint</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="p">)</span>

<span class="c1"># one of the event/error processors returned None</span>
<span class="k">if</span> <span class="n">event_</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
Expand Down Expand Up @@ -538,11 +538,8 @@ <h1>Source code for sentry_sdk.client</h1><div class="highlight"><pre>
<span class="n">is_checkin</span> <span class="o">=</span> <span class="n">event_opt</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;type&quot;</span><span class="p">)</span> <span class="o">==</span> <span class="s2">&quot;check_in&quot;</span>
<span class="n">attachments</span> <span class="o">=</span> <span class="n">hint</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;attachments&quot;</span><span class="p">)</span>

<span class="n">dynamic_sampling_context</span> <span class="o">=</span> <span class="p">(</span>
<span class="n">event_opt</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;contexts&quot;</span><span class="p">,</span> <span class="p">{})</span>
<span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;trace&quot;</span><span class="p">,</span> <span class="p">{})</span>
<span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;dynamic_sampling_context&quot;</span><span class="p">,</span> <span class="p">{})</span>
<span class="p">)</span>
<span class="n">trace_context</span> <span class="o">=</span> <span class="n">event_opt</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;contexts&quot;</span><span class="p">,</span> <span class="p">{})</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;trace&quot;</span><span class="p">)</span> <span class="ow">or</span> <span class="p">{}</span>
<span class="n">dynamic_sampling_context</span> <span class="o">=</span> <span class="n">trace_context</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">&quot;dynamic_sampling_context&quot;</span><span class="p">,</span> <span class="p">{})</span>

<span class="c1"># If tracing is enabled all events should go to /envelope endpoint.</span>
<span class="c1"># If no tracing is enabled only transactions, events with attachments, and checkins should go to the /envelope endpoint.</span>
Expand Down
Loading

0 comments on commit 53a8ad2

Please sign in to comment.