Skip to content

Commit 2f936e6

Browse files
committed
refactor: remove markdown docs and revert unnecessary Sentry disabling
- Remove PR_DESCRIPTION.md (will be added manually to PR) - Revert LOCAL_DEVELOPMENT.md changes - Restore original Sentry Flask integration in main.py (no interference with WorkflowTracer) - Restore original github_sdk.py send_trace method (GithubClient not used in current implementation)
1 parent 6c14dc2 commit 2f936e6

File tree

3 files changed

+19
-105
lines changed

3 files changed

+19
-105
lines changed

PR_DESCRIPTION.md

Lines changed: 0 additions & 95 deletions
This file was deleted.

src/github_sdk.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,15 @@ def _send_envelope(self, trace):
136136
return req
137137

138138
def send_trace(self, job):
139-
# DISABLED: Individual job traces are now handled by WorkflowTracer
140-
# This prevents the old individual job transaction structure from appearing in Sentry
141-
logging.info(
142-
f"DISABLED: Individual job trace for '{job['name']}' - now handled by WorkflowTracer"
143-
)
144-
return None
139+
# This can happen when the workflow is skipped and there are no steps
140+
if job["conclusion"] == "skipped":
141+
logging.info(
142+
f"We are ignoring '{job['name']}' because it was skipped -> {job['html_url']}",
143+
)
144+
return
145+
trace = self._generate_trace(job)
146+
if trace:
147+
return self._send_envelope(trace)
145148

146149

147150
def _base_transaction(job):

src/main.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@
1515

1616
APP_DSN = os.environ.get("APP_DSN")
1717
if APP_DSN:
18-
# COMPLETELY DISABLED: No Sentry integration for Flask app
19-
# We only want our custom workflow transactions, not Flask request transactions
20-
# sentry_sdk.init() is commented out to prevent ANY automatic transactions
21-
pass
18+
# This tracks errors and performance of the app itself rather than GH workflows
19+
sentry_sdk.init(
20+
dsn=APP_DSN,
21+
integrations=[FlaskIntegration()],
22+
# Set traces_sample_rate to 1.0 to capture 100%
23+
# of transactions for performance monitoring.
24+
# We recommend adjusting this value in production.
25+
traces_sample_rate=1.0,
26+
environment=os.environ.get("FLASK_ENV", "production"),
27+
)
2228

2329
LOGGING_LEVEL = os.environ.get("LOGGING_LEVEL", "INFO")
2430
# Set the logging level for all loggers (e.g. requests)

0 commit comments

Comments
 (0)