Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix 1415: observability_exclude_paths env parsing issue#1556

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
nmveeresh wants to merge3 commits intomain
base:main
Choose a base branch
Loading
fromfix-1415/observability-exclude-paths-settings-error

Conversation

@nmveeresh
Copy link
Collaborator

Closes:#1415

Fixobservability_exclude_paths Env Parsing Issue

Summary:
This PR addresses theSettingsError encountered when loading theOBSERVABILITY_EXCLUDE_PATHS environment variable inmcpgateway. The error occurred because the environment variable was previously provided as a comma-separated string, whichpydantic-settings could not parse into aList[str].

Changes:

  • Updatedconfig.py to ensureobservability_exclude_paths is correctly parsed from environment variables as a JSON array.

  • Modified.env example and documentation to use JSON array format:

    OBSERVABILITY_EXCLUDE_PATHS='["/health", "/healthz", "/ready", "/metrics", "/static/.*"]'

Impact:

  • Prevents runtime errors on application startup due to settings parsing issues.
  • Compatible with .env files, shell exports, and Helm/Kubernetes environment variables.
  • Ensures observability paths are correctly loaded and applied for tracing exclusion.

Testing:

  • Verified settings.observability_exclude_paths loads correctly from all sources.
  • Confirmed that default values are applied when the env variable is unset.
  • Local and containerized setups tested to ensure no regressions.
    python -c"from mcpgateway.config import settings; print(settings.observability_exclude_paths)"

Output:

['/health','/healthz','/ready','/metrics','/static/.*']

Signed-off-by: Veeresh K <veeruveeresh1522@gmail.com>
Signed-off-by: Veeresh K <veeruveeresh1522@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@crivetimihaicrivetimihaiAwaiting requested review from crivetimihaicrivetimihai will be requested when the pull request is marked ready for reviewcrivetimihai is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: SettingsError raised when parsing environment variable observability_exclude_paths in Pydantic settings

3 participants

@nmveeresh@crivetimihai

[8]ページ先頭

©2009-2025 Movatter.jp