Next.js Discord

Discord Forum

open-telemetry on nodejs backend

Unanswered
Tonkinese posted this in #help-forum
Open in Discord
TonkineseOP
not sure if it is working no traces upload on langfuse, see logs below

I had follow the exact code on langfuse documentation on integrating ai-sdk nodejs. with
"langfuse-vercel": "^3.33.1",
"ai": "^4.1.7",

Span {
attributes: {
'http.request.method': 'POST',
'http.request.method_original': 'POST',
'url.full': 'https://api.openai.com/v1/chat/completions',
'url.path': '/v1/chat/completions',
'url.query': '',
'url.scheme': 'https',
'server.address': 'api.openai.com',
'server.port': 443,
'user_agent.original': 'undici',
'network.peer.address': '172.66.0.243',
'network.peer.port': 443,
'http.response.status_code': 200
},
links: [],
events: [],
_droppedAttributesCount: 0,
_droppedEventsCount: 0,
_droppedLinksCount: 0,
status: { code: 0 },
endTime: [ 1738874650, 285229792 ],
_ended: true,
_duration: [ 3, 64229792 ],
name: 'POST',
_spanContext: {
traceId: '476d0c2ba6fdfa39e8aa30122d6458c6',
spanId: 'afc77b06fd1a6088',
traceFlags: 1,
traceState: undefined
},
parentSpanId: undefined,
kind: 2,
_performanceStartTime: 2624.053125023842,
_performanceOffset: -0.80224609375,
_startTimeProvided: false,
startTime: [ 1738874647, 221000000 ],
resource: Resource {
_attributes: [Object],
asyncAttributesPending: false,
_syncAttributes: [Object],
_asyncAttributesPromise: [Promise]
},
instrumentationLibrary: {
name: '@opentelemetry/instrumentation-undici',
version: '0.10.0',
schemaUrl: undefined
},
_spanLimits: {
attributeValueLengthLimit: Infinity,
attributeCountLimit: 128,
linkCountLimit: 128,
eventCountLimit: 128,
attributePerEventCountLimit: 128,
attributePerLinkCountLimit: 128
},
_attributeValueLengthLimit: Infinity,
_spanProcessor: MultiSpanProcessor { _spanProcessors: [Array] }
}
]
[2025-02-06T20:44:10.292Z] [LangfuseExporter] Ignoring non-AI SDK span GET
[2025-02-06T20:44:10.292Z] [LangfuseExporter] Ignoring non-AI SDK span POST
[2025-02-06T20:44:10.293Z] [LangfuseExporter] Shutting down Langfuse...

0 Replies