Docs: OTLP metadata and user identity span attributes#302
Merged
Conversation
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.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 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.
super-jaba
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:user.id→user_idmetadata, with deprecatedenduser.idas a fallbackgen_ai.conversation.id→conversation_idmetadata, withsession.idas a fallbackpromptlayer.metadata.<key>→<key>metadatapromptlayer.metadata.*overrides standard attributes) and a note that resource attributes apply trace-widereference/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.idandpromptlayer.prompt.label, but the OTLP extractor only resolvespromptlayer.prompt.name(optionally withpromptlayer.prompt.version) —idis never read andlabelis 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.