Observability · recorded 2026-08-29 · applies to 1 tool(s) ✓ Verified

Problem: Flood of "Invalid type NoneType for attribute http.port" warnings after logfire upgrade —— Trove problem library

Verified 2026-08-29Invalid type NoneType for http.port after upgrade — set by third-party clients (kiota/httpx); the warning is harmless and can be ignored.

Quick fix

# One-liner: locate the third-party client in your call chain that sets http.port; upgrade it or wait for its fix
pip list | grep -iE "kiota|httpx"

Once confirmed as a third-party issue, the warning is harmless and can be ignored.

What you will run into

After upgrading logfire (case: 2.11.0 → 2.11.1), the console floods with Invalid type NoneType for attribute 'http.port' value warnings; without logfire configured they don't appear.

You'd think it's a logfire bug — the root cause isn't logfire; it just surfaces a third-party problem.

Why this happens

Root cause isn't logfire: a third-party HTTP client (in the case, a kiota-family httpx adapter) sets http.port to None even when url.port is None; OpenTelemetry attribute validation warns on NoneType;

logfire merely exposes the warning (official issue #749, closed; maintainer's diagnosis).

An observability chain is three stages: "producer -> validator -> presenter".

Your app code (via a third-party HTTP client) produces spans and attributes -> the OpenTelemetry SDK validates attribute types per the spec -> logfire presents the result in the console.

The root cause of this warning chain sits in the producer (the third-party client passed a None value); the validator just warns per spec, and the presenter (logfire) merely displays it.

The "warnings appear after upgrading logfire" illusion is a timing coincidence: the new version surfaces warnings that were previously suppressed, but the code creating the problem was the third-party all along.

Attribution has a fixed method: see which stage of the chain manufactures the warning — logfire has no config item that can suppress it (proving it only presents), and the warning disappears after the third-party fix (proving the root cause is third-party).

For this class of "the presenter takes the blame" problems, locate the producer first; don't patch the presenter.

RoleBehavior
Third-party HTTP clientSets http.port=None even when url.port is None
OpenTelemetry attribute validationWarns on NoneType
logfireSurfaces the warning (not the root cause)

Step by step

1. Locate the third-party HTTP client setting http.port — Diagnose

kiota-family / httpx adapters — upgrade or wait for their fix.

2. Once confirmed as third-party, the warning is harmless and can be ignored — Required

Don't work around it on the logfire side (no config item needed).

How to confirm it works

Warnings disappear after the third-party fix (expected shape):

Upgrade the third-party client → console stops flooding "Invalid type NoneType for attribute 'http.port'"

Or confirm the root cause and ignore: the warning is harmless and doesn't affect functionality (official issue #749 maintainer conclusion).

Other environments

EnvironmentNotes
Third-party clientkiota-family httpx adapter (issue #749 case)
Fix locationThird party should set http.port only when url.port is not None
logfire sideNo config item needed; don't work around
Not measuredReal telemetry pipeline not measured (needs a project token); 4.41.0 command surface / minimal repro didn't trigger it

Symptom

After upgrading logfire (case: 2.11.0 -> 2.11.1), the console is flooded with Invalid type NoneType for attribute 'http.port' value warnings; they do not appear without logfire configured.

Cause

Root cause is not logfire: a third-party HTTP client (in the case, a kiota-style httpx adapter) still sets http.port to None when url.port is None; OpenTelemetry attribute validation warns on NoneType; logfire merely surfaces the warning (official issue #749, closed; maintainer's conclusion).

Solution

  1. Locate the third-party HTTP client setting http.port in the call chain (kiota-style/httpx adapters), upgrade it or wait for its fix.
  2. Once confirmed as a third-party issue, the warning is harmless and can be ignored; do not work around it on the logfire side (no config item needed).
Verification Evidence
  • Official issue #749 (closed 2024-12-30): maintainer located the third-party httpx adapter, noting http.port should only be set when url.port is not None (anonymous API supplementary evidence,).
  • Verified in this marketplace: logfire 4.41.0 command surface/minimal repro did not trigger the warning; honestly noted "real telemetry chain not tested (needs a project token)".

Applicable tools (1)

This problem is linked from the tool pages below — reachable from either side.

logfire

Source & evidence

Recorded Verified ✓ VerifiedApplies to 1 tool(s)
Entries contain locally measured or reviewable-source solutions; unmeasured items are explicitly labeled.

← Observability domain | Problem Catalog Experience | Facing another issue? Go to the Helpdesk