pydantic / pydantic/logfire-rust

Warn when a token's region is unrecognised instead of silently defaulting to US

Open Beginner friendly
#149 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
77
Forks
10
Avg merge
8h 26m
Merged PRs (30d)
5

Description

When a token's region segment isn't one the SDK knows, the region match falls through to the US arm (logfire-core/src/token.rs), so telemetry can be sent to the wrong region with no signal anywhere.

Keeping the fallback seems right, but a warning would make a misrouted deployment visible instead of presenting as missing data.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in logfire-core/src/token.rs and trace the region-segment matching logic. Keep the existing US fallback, but make an unrecognised region produce a warning so misrouting is visible. Verify the relevant Rust tests and confirm recognised regions remain unchanged while unknown regions still fall back to US with a warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability-sre
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.