Skip to content

Commit cd2ac40

Browse files
committed
fix attribute serialization
1 parent 7274f19 commit cd2ac40

File tree

6 files changed

+1456
-128
lines changed

6 files changed

+1456
-128
lines changed

.changeset/dull-bananas-act.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@pydantic/logfire-api": patch
3+
"logfire": patch
4+
---
5+
6+
Fix attribute serialization

examples/nextjs-client-side-instrumentation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "client-side-instrumentation",
2+
"name": "@pydantic/nextjs-client-side-instrumentation",
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {

examples/node/index.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,25 @@ logfire.configure({
55
serviceName: 'example-node-script',
66
serviceVersion: '1.0.0',
77
environment: 'staging',
8-
diagLogLevel: logfire.DiagLogLevel.INFO,
8+
token: 'pylf_v1_eu_fcksvB6FNdWKZ3xGbrG8g8GXHFqPfFXgtRgnZdvV6PCj',
9+
diagLogLevel: logfire.DiagLogLevel.DEBUG,
910
codeSource: {
1011
repository: 'https://github.com/pydantic/pydantic',
1112
revision: 'master',
1213
},
1314
})
1415

1516

16-
logfire.info('Hello from Node.js', {
17-
'attribute-key': 'attribute-value'
17+
logfire.span('Hello from Node.js, {next_player}', {
18+
'attribute-key': 'attribute-value',
19+
next_player: '0',
20+
arr: [1, 2, 3],
21+
something: {
22+
value: [1, 2, 3],
23+
key: 'value'
24+
}
1825
}, {
1926
tags: ['example', 'example2']
27+
}, (span) => {
28+
span.end()
2029
})

0 commit comments

Comments
 (0)