Skip to content

feat: improved settings via env variables #359

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

Merged
merged 6 commits into from
Jul 9, 2025
Merged

feat: improved settings via env variables #359

merged 6 commits into from
Jul 9, 2025

Conversation

dcramer
Copy link
Member

@dcramer dcramer commented Jul 8, 2025

Validate SENTRY_HOST to only accept hostname (e.g. "sentry.io"). Support SENTRY_URL for URLs (e.g. "https://sentry.io", "http://localhost:8000") - entirely because I'm tired of support tickets.

Remove deprecated SENTRY_AUTH_TOKEN.

Rename MCP_HOST to MCP_URL.

🤖 Generated with Claude Code

@dcramer dcramer marked this pull request as ready for review July 8, 2025 23:58
@dcramer dcramer changed the title feat: add flexible SENTRY_HOST configuration supporting both hostnames and URLs feat: improved settings via env variables Jul 8, 2025
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

Attention: Patch coverage is 53.48837% with 40 lines in your changes missing coverage. Please review.

Project coverage is 59.46%. Comparing base (74abebb) to head (f398776).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/mcp-server/src/index.ts 0.00% 24 Missing ⚠️
packages/mcp-server/src/utils/url-utils.ts 68.18% 14 Missing ⚠️
...ges/mcp-cloudflare/src/server/lib/mcp-transport.ts 0.00% 1 Missing ⚠️
packages/mcp-cloudflare/src/server/routes/chat.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #359      +/-   ##
==========================================
- Coverage   59.69%   59.46%   -0.23%     
==========================================
  Files          78       77       -1     
  Lines        6634     6580      -54     
  Branches      493      495       +2     
==========================================
- Hits         3960     3913      -47     
+ Misses       2674     2667       -7     
Flag Coverage Δ
evals ?
unittests 59.46% <53.48%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

cursor[bot]

This comment was marked as outdated.

… and full URL formats

Allow SENTRY_HOST to accept either hostname-only (e.g. "sentry.io") or full URL (e.g. "https://sentry.io", "http://localhost:8000") formats. This improves flexibility for self-hosted and local development scenarios while maintaining backwards compatibility.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@@ -58,7 +58,7 @@ OPENAI_API_KEY=your_openai_api_key
SENTRY_ACCESS_TOKEN=your_sentry_access_token

# Optional
SENTRY_HOST=https://sentry.io # For self-hosted Sentry instances
SENTRY_HOST=sentry.io # For self-hosted Sentry instances (hostname or full URL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment for SENTRY_HOST is inconsistent with the implementation. According to the PR changes, SENTRY_HOST should only accept hostnames without protocols, while SENTRY_URL should be used for full URLs. The comment should be updated to:

SENTRY_HOST=sentry.io  # For self-hosted Sentry instances (hostname only, no protocol)

Additionally, consider adding a line for SENTRY_URL to show both options:

SENTRY_URL=https://sentry.io  # Alternative to SENTRY_HOST, accepts full URLs with protocol
Suggested change
SENTRY_HOST=sentry.io # For self-hosted Sentry instances (hostname or full URL)
SENTRY_HOST=sentry.io # For self-hosted Sentry instances (hostname only, no protocol)
SENTRY_URL=https://sentry.io # Alternative to SENTRY_HOST, accepts full URLs with protocol

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

@dcramer dcramer merged commit 3d35862 into main Jul 9, 2025
13 checks passed
@dcramer dcramer deleted the ref-settings branch July 9, 2025 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant