Skip to content

Commit 45c545d

Browse files
authored
PYD-3529 Close Logfire JS manual API parity gaps (#134)
1 parent 594450a commit 45c545d

45 files changed

Lines changed: 4020 additions & 170 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'logfire': minor
3+
'@pydantic/logfire-node': patch
4+
'@pydantic/logfire-browser': patch
5+
---
6+
7+
Add opt-in baggage projection for Logfire JS manual span attributes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'logfire': minor
3+
'@pydantic/logfire-node': patch
4+
'@pydantic/logfire-browser': patch
5+
'@pydantic/logfire-cf-workers': patch
6+
---
7+
8+
Add a core `instrument(fn, options?)` wrapper for manual function spans.

.changeset/json-schema-metadata.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'logfire': minor
3+
'@pydantic/logfire-node': patch
4+
'@pydantic/logfire-browser': patch
5+
---
6+
7+
Add richer bounded JSON schema metadata for serialized object and array attributes, with `jsonSchema` modes for rich, legacy broad, or disabled schema metadata.

.changeset/min-level-filtering.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'logfire': minor
3+
'@pydantic/logfire-node': patch
4+
'@pydantic/logfire-browser': patch
5+
---
6+
7+
Add configurable minimum-level filtering for manual Logfire telemetry.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@pydantic/logfire-node': minor
3+
---
4+
5+
Add Node object-style console output options for minimum level, tags, and timestamps.
6+
7+
`console: true` and `LOGFIRE_CONSOLE=true` now use an `info` console minimum by default. Use `console: { minLevel: 'debug' }`
8+
or `console: { minLevel: 'trace' }` to print lower-severity output locally.

.changeset/otel-service-env.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@pydantic/logfire-node': patch
3+
---
4+
5+
Read `OTEL_SERVICE_NAME` and `OTEL_SERVICE_VERSION` as Node service metadata fallbacks when the corresponding `LOGFIRE_*`
6+
environment variables are unset.

.changeset/report-error-options.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'logfire': minor
3+
'@pydantic/logfire-browser': patch
4+
'@pydantic/logfire-cf-workers': patch
5+
'@pydantic/logfire-node': patch
6+
---
7+
8+
Add `reportError()` options for tags and parent spans, and allow reporting unknown caught values.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'logfire': minor
3+
'@pydantic/logfire-browser': minor
4+
'@pydantic/logfire-cf-workers': minor
5+
'@pydantic/logfire-node': patch
6+
---
7+
8+
Add scoped manual API clients with `withTags()` and `withSettings()` for reusable tags and default levels.

.codex/hooks.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"hooks": {
3+
"PostToolUse": [
4+
{
5+
"matcher": "apply_patch|functions.apply_patch|Edit|Write",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "bash \"$(git rev-parse --show-toplevel)/.codex/hooks/vp-check-fix-changed.sh\"",
10+
"timeout": 60,
11+
"statusMessage": "Running vp check --fix on changed files"
12+
}
13+
]
14+
}
15+
]
16+
}
17+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
root="$(git rev-parse --show-toplevel)"
5+
cd "$root"
6+
7+
mapfile -t files < <(
8+
{
9+
git diff --name-only --diff-filter=ACMR
10+
git diff --cached --name-only --diff-filter=ACMR
11+
git ls-files --others --exclude-standard
12+
} |
13+
awk '
14+
/\.(js|ts|tsx|mjs|mts|json|md|ya?ml)$/ {
15+
if ($0 ~ /^(packages|examples|docs|\.changeset)\// || $0 ~ /^\.codex\/hooks\.json$/ || $0 ~ /^(package\.json|pnpm-workspace\.yaml|vite\.config\.ts|README\.md|AGENTS\.md)$/) {
16+
print
17+
}
18+
}
19+
' |
20+
sort -u
21+
)
22+
23+
if [ "${#files[@]}" -eq 0 ]; then
24+
exit 0
25+
fi
26+
27+
vp check --fix "${files[@]}"

0 commit comments

Comments
 (0)