Skip to content

[BUG]: AI SDK experimental_telemetry.functionId is ignored #6352

@carlmw

Description

@carlmw

Tracer Version(s)

5.64.0

Node.js Version(s)

20.19.0

Bug Report

Not sure if this is truly a bug/oversight or really a feature request.

In https://ai-sdk.dev/docs/ai-sdk-core/telemetry#telemetry-metadata there is mention of a functionId.

When using an OTel tracer this is used to form the name of the span — which i've verified.

Expected
The span has a name my-cool-span

Actual
The span has the default name generateText

Perhaps there is a work around for this or some documentation somewhere for how to set the span name through dd-trace?

Reproduction Code

await generateText({
  model: openai("gpt-4o-mini"),
  prompt: "What is best in life?",
  experimental_telemetry: {
    isEnabled: true,
    functionId: 'my-cool-span'
  }
})

Error Logs

No response

Tracer Config

No response

Operating System

Darwin Kernel Version 24.6.0

Bundling

No Bundling

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions