René's URL Explorer Experiment


Title: Found different `gen_ai.conversation.id` value in invoke_agent LangGraph span · Issue #157 · SAP/cloud-sdk-python · GitHub

Open Graph Title: Found different `gen_ai.conversation.id` value in invoke_agent LangGraph span · Issue #157 · SAP/cloud-sdk-python

X Title: Found different `gen_ai.conversation.id` value in invoke_agent LangGraph span · Issue #157 · SAP/cloud-sdk-python

Description: Describe the Bug EDIT on 15 June: I am using auto_instrument() from sap-cloud-sdk, so the span is auto generated by the tracer instead of using the custom invoke_agent_span() function mentioned in this user guide. Based on this All-in on...

Open Graph Description: Describe the Bug EDIT on 15 June: I am using auto_instrument() from sap-cloud-sdk, so the span is auto generated by the tracer instead of using the custom invoke_agent_span() function mentioned in ...

X Description: Describe the Bug EDIT on 15 June: I am using auto_instrument() from sap-cloud-sdk, so the span is auto generated by the tracer instead of using the custom invoke_agent_span() function mentioned in ...

Opengraph URL: https://github.com/SAP/cloud-sdk-python/issues/157

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Found different `gen_ai.conversation.id` value in invoke_agent LangGraph span","articleBody":"### Describe the Bug\n\nEDIT on 15 June: I am using `auto_instrument()` from `sap-cloud-sdk`, so the span is auto generated by the tracer instead of using the custom `invoke_agent_span()` function mentioned in this [user guide](https://github.com/SAP/cloud-sdk-python/blob/main/src/sap_cloud_sdk/core/telemetry/user-guide.md).\n\nBased on this [All-in on AI decision](https://github.tools.sap/CPA/landing-page-content/blob/main/40_Results/all-in-on-ai-decisions/conversation-id-baggage-for-online-agent-evaluation.md), the calling system (that calls an agent) must generate a conversation identifier and set it in the W3C baggage header on every request within a conversation. However, when I use `sap-cloud-sdk` to instrument a LangGraph agent, there is a different value of `gen_ai.conversation.id` in the invoke_agent LangGraph span set by `traceloop`, which derives the conversation ID from the context id of the A2A server of a LangGraph agent. When `gen_ai.conversation.id` is set in the W3C baggage header, all spans have the same `gen_ai.conversation.id` value **EXCEPT** the invoke_agent LangGraph span, which is an inconsistency.\n\n### Steps to Reproduce\n\n1. Run a LangGraph agent in https://github.tools.sap/Montana-AI-Singapore/a2a-server-samples/tree/main/appfnd-langgraph-basic and use `auto_instrument()` from `sap-cloud-sdk`\n2. Copy `.env.example` and fill up the variables accordingly. I used a local MLflow server and sent the traces via http/protobuf\n3. Run the agent `uv run app` and send a message to the agent and inject `gen_ai.conversation.id` in the W3C baggage header\n\nThis is how the trace spans look:\nRoot span: `gen_ai.conversation.id == 48e35936-82ab-4f1a-beaf-b2fa4273ac5e`, generated by the calling system\n\u003cimg width=\"1529\" height=\"766\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/61dbce11-3a95-4fb1-ba4f-578f79f25aa3\" /\u003e\n\ninvoke_agent LangGraph span: `gen_ai.conversation.id == b01915bf-48a2-4f8b-9681-19bc166553c5`\n\u003cimg width=\"1529\" height=\"777\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/31164be9-35f5-4438-ac9f-3adc2fbd1195\" /\u003e\n\n### Expected Behavior\n\nI expect to see consistent values of `gen_ai.conversation.id` in all the spans in my trace, following the decision on All-in on AI. This could mean:\n- blocking traceloop from setting `gen_ai.conversation.id` from `traceloop.association.properties.thread_id`, or\n- overriding the value in invoke_agent LangGraph span such that the value is consistent.\n\n### Screenshots\n\n_No response_\n\n### Used Versions\n\n- Python version via `python --version`: 3.12.12\n- SAP Cloud SDK for Python version: 0.19.3, but tested on 0.25.1 in a colleague's env\n- Framework version (if applicable, e.g., Flask, FastAPI): ...\n\n\u003cdetails\u003e\u003csummary\u003eInstalled packages via \u003ccode\u003epip list\u003c/code\u003e or \u003ccode\u003euv pip list\u003c/code\u003e\u003c/summary\u003e\n\n```\nPackage list here\n```\n\u003c/details\u003e\n\n\n### Code Examples\n\n```python\n# Your code here\n```\n\n\n### Stack Trace\n\n_No response_\n\n### Log File\n\n\u003cdetails\u003e\u003csummary\u003eLog file\u003c/summary\u003e\n...\n\u003c/details\u003e\n\n\n### Affected Development Phase\n\nDevelopment\n\n### Impact\n\nImpaired\n\n### Timeline\n\n_No response_","author":{"url":"https://github.com/pasainatan","@type":"Person","name":"pasainatan"},"datePublished":"2026-06-12T02:30:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/157/cloud-sdk-python/issues/157"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2a9008c7-8fa5-6cf9-1e6e-d55a296dbf44
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8C38:162299:10EAB5:16B100:6A515D32
html-safe-nonce02a50df8ce18026d38412081b6bd5bbe03b4a9fb9fba700a62f1f47dd600449e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzM4OjE2MjI5OToxMEVBQjU6MTZCMTAwOjZBNTE1RDMyIiwidmlzaXRvcl9pZCI6IjE3NDgwMDEwMTQ5MzY1OTE2NjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac5e9bd08529d31e33b6a9f53eac02205c94290f300f35189b76196e2f5e25b132
hovercard-subject-tagissue:4645719923
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/SAP/cloud-sdk-python/157/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bc658cb825b0fed1dc28e7979ee2dfbfcae07ae66300fe40e324730010ff7c88/SAP/cloud-sdk-python/issues/157
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bc658cb825b0fed1dc28e7979ee2dfbfcae07ae66300fe40e324730010ff7c88/SAP/cloud-sdk-python/issues/157
og:image:altDescribe the Bug EDIT on 15 June: I am using auto_instrument() from sap-cloud-sdk, so the span is auto generated by the tracer instead of using the custom invoke_agent_span() function mentioned in ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepasainatan
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/SAP/cloud-sdk-python git https://github.com/SAP/cloud-sdk-python.git
octolytics-dimension-user_id2531208
octolytics-dimension-user_loginSAP
octolytics-dimension-repository_id1187276298
octolytics-dimension-repository_nwoSAP/cloud-sdk-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1187276298
octolytics-dimension-repository_network_root_nwoSAP/cloud-sdk-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2eeb434949a926fad21064b4d395a54759f7a0b2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/SAP/cloud-sdk-python/issues/157#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FSAP%2Fcloud-sdk-python%2Fissues%2F157
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FSAP%2Fcloud-sdk-python%2Fissues%2F157
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=SAP%2Fcloud-sdk-python
Reloadhttps://github.com/SAP/cloud-sdk-python/issues/157
Reloadhttps://github.com/SAP/cloud-sdk-python/issues/157
Reloadhttps://github.com/SAP/cloud-sdk-python/issues/157
Please reload this pagehttps://github.com/SAP/cloud-sdk-python/issues/157
SAP https://github.com/SAP
cloud-sdk-pythonhttps://github.com/SAP/cloud-sdk-python
Notifications https://github.com/login?return_to=%2FSAP%2Fcloud-sdk-python
Fork 33 https://github.com/login?return_to=%2FSAP%2Fcloud-sdk-python
Star 18 https://github.com/login?return_to=%2FSAP%2Fcloud-sdk-python
Code https://github.com/SAP/cloud-sdk-python
Issues 6 https://github.com/SAP/cloud-sdk-python/issues
Pull requests 18 https://github.com/SAP/cloud-sdk-python/pulls
Actions https://github.com/SAP/cloud-sdk-python/actions
Projects https://github.com/SAP/cloud-sdk-python/projects
Security and quality 0 https://github.com/SAP/cloud-sdk-python/security
Insights https://github.com/SAP/cloud-sdk-python/pulse
Code https://github.com/SAP/cloud-sdk-python
Issues https://github.com/SAP/cloud-sdk-python/issues
Pull requests https://github.com/SAP/cloud-sdk-python/pulls
Actions https://github.com/SAP/cloud-sdk-python/actions
Projects https://github.com/SAP/cloud-sdk-python/projects
Security and quality https://github.com/SAP/cloud-sdk-python/security
Insights https://github.com/SAP/cloud-sdk-python/pulse
#213https://github.com/SAP/cloud-sdk-python/pull/213
Found different gen_ai.conversation.id value in invoke_agent LangGraph spanhttps://github.com/SAP/cloud-sdk-python/issues/157#top
#213https://github.com/SAP/cloud-sdk-python/pull/213
https://github.com/LucasAlvesSoares
bugSomething isn't workinghttps://github.com/SAP/cloud-sdk-python/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/pasainatan
pasainatanhttps://github.com/pasainatan
on Jun 12, 2026https://github.com/SAP/cloud-sdk-python/issues/157#issue-4645719923
user guidehttps://github.com/SAP/cloud-sdk-python/blob/main/src/sap_cloud_sdk/core/telemetry/user-guide.md
All-in on AI decisionhttps://github.tools.sap/CPA/landing-page-content/blob/main/40_Results/all-in-on-ai-decisions/conversation-id-baggage-for-online-agent-evaluation.md
https://github.tools.sap/Montana-AI-Singapore/a2a-server-samples/tree/main/appfnd-langgraph-basichttps://github.tools.sap/Montana-AI-Singapore/a2a-server-samples/tree/main/appfnd-langgraph-basic
https://private-user-images.githubusercontent.com/292382269/606800602-61dbce11-3a95-4fb1-ba4f-578f79f25aa3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM3MTc0NzAsIm5iZiI6MTc4MzcxNzE3MCwicGF0aCI6Ii8yOTIzODIyNjkvNjA2ODAwNjAyLTYxZGJjZTExLTNhOTUtNGZiMS1iYTRmLTU3OGY3OWYyNWFhMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcxMFQyMDU5MzBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04YTc4NDdmM2IwYTI2MGNjZDllOWZlMDAxNDEzMDJhN2QxYTZmNWJiZTBmNTRiYTFlOTkyOTQ1ODA3OTg0ZmMyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.VtN0BlwqakSerInefsTVYzlbtyvmrOM7K541xL1Kiqw
https://private-user-images.githubusercontent.com/292382269/606800832-31164be9-35f5-4438-ac9f-3adc2fbd1195.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM3MTc0NzAsIm5iZiI6MTc4MzcxNzE3MCwicGF0aCI6Ii8yOTIzODIyNjkvNjA2ODAwODMyLTMxMTY0YmU5LTM1ZjUtNDQzOC1hYzlmLTNhZGMyZmJkMTE5NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcxMFQyMDU5MzBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00YTdjNDQ1ZTYwNDIzMmY4YjAyZTBiZWVhZDk3NjYwMTBmNTcyYjIxMWE4NzI4ZjJiOTU3ZjA5OGRmZTJmZWZmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.2gjx7PYBfoshs27ZQggZiPfPPxrTVdS4LVidEqoGygI
LucasAlvesSoareshttps://github.com/LucasAlvesSoares
bugSomething isn't workinghttps://github.com/SAP/cloud-sdk-python/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.