For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • Python SDK
    • Overview
    • Initialize
    • Log Batch Results
    • Instrumentation Protocol
    • API Client
  • TypeScript SDK
    • Overview
    • Initialize
      • propagateAttributes()
      • Respan Params
    • Log Batch Results
    • API Client
LogoLogo
DiscordPlatform
TypeScript SDKContext

propagateAttributes()

Attach customer identifiers and metadata to all spans in a scope.
Was this page helpful?
Previous

Respan Parameters

Understanding Respan-specific span parameters for filtering and metadata

Next
Built with
1await respan.propagateAttributes(
2 {
3 customer_identifier: "user_123",
4 thread_identifier: "conv_001",
5 metadata: { plan: "pro" },
6 },
7 async () => {
8 // All spans created here inherit these attributes
9 await respan.withWorkflow({ name: "handle_request" }, async () => {
10 const response = await client.chat.completions.create({
11 model: "gpt-4o-mini",
12 messages: [{ role: "user", content: "Hello" }],
13 });
14 });
15 }
16);
AttributeTypeDescription
customer_identifierstringEnd user identifier
thread_identifierstringConversation thread ID
metadataRecord<string, any>Custom key-value pairs