Skip to content

Docs: OTLP metadata and user identity span attributes#302

Merged
Jped merged 2 commits into
masterfrom
docs/otlp-metadata-attributes
May 19, 2026
Merged

Docs: OTLP metadata and user identity span attributes#302
Jped merged 2 commits into
masterfrom
docs/otlp-metadata-attributes

Conversation

@Jped
Copy link
Copy Markdown
Contributor

@Jped Jped commented May 19, 2026

Summary

Documents the OTLP ingestion support for attaching searchable metadata to request logs via span attributes — the OpenTelemetry-native equivalent of the SDK's track.metadata(), with no separate REST call.

Corresponds to backend PR MagnivOrg/promptlayer-app#936.

Changes

features/opentelemetry.mdx — new "Attaching User Identity & Metadata" section covering:

  • Standard OpenTelemetry attributes (picked up with zero PromptLayer-specific instrumentation):
    • user.iduser_id metadata, with deprecated enduser.id as a fallback
    • gen_ai.conversation.idconversation_id metadata, with session.id as a fallback
  • PromptLayer custom metadata: promptlayer.metadata.<key><key> metadata
  • Precedence rule (promptlayer.metadata.* overrides standard attributes) and a note that resource attributes apply trace-wide
  • Python + JavaScript code examples

reference/otlp-ingest-traces.mdx — added a behavior note listing the metadata attributes.

Also: corrected prompt-template linking docs

The existing "Linking to Prompt Templates" docs listed promptlayer.prompt.id and promptlayer.prompt.label, but the OTLP extractor only resolves promptlayer.prompt.name (optionally with promptlayer.prompt.version) — id is never read and label is extracted but never used to resolve a version. Removed the unsupported attributes from the table, API reference, and code samples so the docs match actual behavior.

Documents the OTLP ingestion support for attaching searchable metadata
to request logs via span attributes (backend PR #936):

- Standard OpenTelemetry attributes: user.id / enduser.id -> user_id,
  gen_ai.conversation.id / session.id -> conversation_id.
- PromptLayer custom metadata: promptlayer.metadata.<key>.

Adds an "Attaching User Identity & Metadata" section to the
OpenTelemetry feature page and a behavior note to the OTLP ingest
API reference.
@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 19, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
promptlayer 🟢 Ready View Preview May 19, 2026, 3:18 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

The OTLP ingestion extractor only resolves promptlayer.prompt.name
(optionally with promptlayer.prompt.version). promptlayer.prompt.id is
never read and promptlayer.prompt.label is extracted but not used to
resolve a version, so documenting them was misleading.

Removes promptlayer.prompt.id / promptlayer.prompt.label from the
prompt-template linking docs and updates the code samples to use
promptlayer.prompt.version.
@Jped Jped merged commit ed20d4f into master May 19, 2026
5 checks passed
@Jped Jped deleted the docs/otlp-metadata-attributes branch May 19, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants