contextbase-shared-plugins 0.3.4__py3-none-any.whl → 0.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: contextbase-shared-plugins
3
- Version: 0.3.4
3
+ Version: 0.4.0
4
4
  Summary: Shared infrastructure for ContextBase plugins
5
5
  Author: Alizain Feerasta
6
6
  Author-email: Alizain Feerasta <alizain.feerasta@gmail.com>
7
- Requires-Dist: contextbase-shared-types==0.3.4
7
+ Requires-Dist: contextbase-shared-types==0.4.0
8
8
  Requires-Dist: airbyte
9
9
  Requires-Dist: azure-identity>=1.25.1
10
10
  Requires-Dist: dagster==1.12.14
@@ -18,4 +18,5 @@ Requires-Dist: pydantic>=2.12.0
18
18
  Requires-Dist: sqlalchemy>=2.0.0
19
19
  Requires-Dist: pydantic-settings>=2.13.1
20
20
  Requires-Dist: tenacity>=8.2
21
+ Requires-Dist: sentry-sdk>=2.35.0
21
22
  Requires-Python: >=3.12, <3.13
@@ -29,9 +29,10 @@ shared_plugins/pg_column_comments.py,sha256=HTSC8Og4jPXdBaiEhrAN__k2UOnb3E_6g38t
29
29
  shared_plugins/pyairbyte.py,sha256=iVPVjn2x1K07YVeDlJVMpuH26YRvXRJ0PxWwHlXdZQM,14038
30
30
  shared_plugins/resources.py,sha256=i-pVKSXmSBAjKh6-KfAppAcuGiPt4cerjExM6nxEqvs,5429
31
31
  shared_plugins/scratch.py,sha256=oZCJZSB5m80Ez7Ox8Ktl7rKV2vFIJyp8LBkZcXp6wlA,4176
32
+ shared_plugins/sentry.py,sha256=BO3-KDfQJ5u1saivUKW8DSLKXw2VKRRIi6eUHHXcJdI,1472
32
33
  shared_plugins/sqlalchemy_types.py,sha256=1e_OxfUQzY377VlV4gidtVroK6FkgdOyMvgZeATxv8E,7123
33
34
  shared_plugins/sqlite.py,sha256=Pl3gXNixyQOrz19HgGojux0Ywkxukmub7rkwdkhU3QY,4301
34
35
  shared_plugins/values.py,sha256=DhTk62AvmPcfUvCa_n-dXN5zTdu4UN9tJeyjzMhGTl8,3199
35
- contextbase_shared_plugins-0.3.4.dist-info/WHEEL,sha256=i9aSRDivn5iP9LaR1BLQX2GNAuriQWPsFwbbWygTX2k,81
36
- contextbase_shared_plugins-0.3.4.dist-info/METADATA,sha256=lZ87lNm3bVVMkqffUEeEUkxva2y-kSGFpQvOQYwYEwo,732
37
- contextbase_shared_plugins-0.3.4.dist-info/RECORD,,
36
+ contextbase_shared_plugins-0.4.0.dist-info/WHEEL,sha256=i9aSRDivn5iP9LaR1BLQX2GNAuriQWPsFwbbWygTX2k,81
37
+ contextbase_shared_plugins-0.4.0.dist-info/METADATA,sha256=8q8uvbnO-sznPtVsAFytmRiIN9HPzbT-RVEgDXx24ow,766
38
+ contextbase_shared_plugins-0.4.0.dist-info/RECORD,,
@@ -0,0 +1,33 @@
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ from importlib.metadata import version
5
+
6
+ import sentry_sdk
7
+
8
+ # Hardcoded write-only ingest key (safe in shipped code). Prod-gated: ctxb (the
9
+ # Node spawn parent) forwards SENTRY_ENABLED=true to the dagster child only from
10
+ # its compiled binary, so the SDK initializes only in shipped runs — never local
11
+ # or CI Dagster, which run from source and never set the flag. Errors only: no
12
+ # tracing, profiling, or replay (internal Sentry spec, pass 1).
13
+ _DSN = "https://96f72b28675ce397ec6cb39a0702e747@o4510556311519232.ingest.us.sentry.io/4511513003229184"
14
+
15
+
16
+ def init_sentry() -> None:
17
+ # Off unless the compiled ctxb forwarded the baked prod-gate (see module note).
18
+ if os.environ.get("SENTRY_ENABLED") != "true":
19
+ return
20
+ # Derive the release from the installed "contextbase-shared-plugins" dist
21
+ # version (release.ts bumps it in lockstep with the pyproject version),
22
+ # labeled "contextbase-core@<version>". Computed here, after the gate, so a
23
+ # disabled/dev/CI run does no metadata lookup, and the dist is guaranteed
24
+ # installed whenever the gate is on. No literal to keep in sync.
25
+ release = f"contextbase-core@{version('contextbase-shared-plugins')}"
26
+ sentry_sdk.init(
27
+ dsn=_DSN,
28
+ environment="production",
29
+ release=release,
30
+ send_default_pii=False,
31
+ # Errors only — performance tracing is deferred to a later pass.
32
+ traces_sample_rate=0,
33
+ )