René's URL Explorer Experiment


Title: TaskHubGrpcClient.schedule_new_orchestration records mismatched instanceId in OpenTelemetry producer span when instance_id is auto-generated · Issue #343 · microsoft/durabletask-python · GitHub

Open Graph Title: TaskHubGrpcClient.schedule_new_orchestration records mismatched instanceId in OpenTelemetry producer span when instance_id is auto-generated · Issue #343 · microsoft/durabletask-python

X Title: TaskHubGrpcClient.schedule_new_orchestration records mismatched instanceId in OpenTelemetry producer span when instance_id is auto-generated · Issue #343 · microsoft/durabletask-python

Description: Problem Description In TaskHubGrpcClient.schedule_new_orchestration (lines 639-650) and AsyncTaskHubGrpcClient.schedule_new_orchestration (lines 1187-1198), an instance ID is pre-resolved for the OpenTelemetry producer span: https://gith...

Open Graph Description: Problem Description In TaskHubGrpcClient.schedule_new_orchestration (lines 639-650) and AsyncTaskHubGrpcClient.schedule_new_orchestration (lines 1187-1198), an instance ID is pre-resolved for the O...

X Description: Problem Description In TaskHubGrpcClient.schedule_new_orchestration (lines 639-650) and AsyncTaskHubGrpcClient.schedule_new_orchestration (lines 1187-1198), an instance ID is pre-resolved for the O...

Opengraph URL: https://github.com/microsoft/durabletask-python/issues/343

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TaskHubGrpcClient.schedule_new_orchestration records mismatched instanceId in OpenTelemetry producer span when instance_id is auto-generated","articleBody":"### Problem Description\n\nIn `TaskHubGrpcClient.schedule_new_orchestration` (lines 639-650) and `AsyncTaskHubGrpcClient.schedule_new_orchestration` (lines 1187-1198), an instance ID is pre-resolved for the OpenTelemetry producer span:\n\nhttps://github.com/microsoft/durabletask-python/blob/06bb27763eb893693f1bc300b86a86e01a5fa641/durabletask/client.py#L638-L650\n\n```python\n        name = orchestrator if isinstance(orchestrator, str) else task.get_name(orchestrator)\n        resolved_instance_id = instance_id if instance_id else uuid.uuid4().hex\n        resolved_version = version if version else self.default_version\n\n        with tracing.suppress_span_emission(not self._emit_trace_spans):\n            with tracing.start_create_orchestration_span(\n                name, resolved_instance_id, version=resolved_version,\n            ):\n                req = build_schedule_new_orchestration_req(\n                    orchestrator, input=input, instance_id=instance_id, start_at=start_at,\n                    reuse_id_policy=reuse_id_policy, tags=tags,\n                    version=version if version else self.default_version,\n                    data_converter=self._data_converter)\n```\n\nAnd similarly in `AsyncTaskHubGrpcClient`:\n\nhttps://github.com/microsoft/durabletask-python/blob/06bb27763eb893693f1bc300b86a86e01a5fa641/durabletask/client.py#L1186-L1198\n\n```python\n        name = orchestrator if isinstance(orchestrator, str) else task.get_name(orchestrator)\n        resolved_instance_id = instance_id if instance_id else uuid.uuid4().hex\n        resolved_version = version if version else self.default_version\n\n        with tracing.suppress_span_emission(not self._emit_trace_spans):\n            with tracing.start_create_orchestration_span(\n                name, resolved_instance_id, version=resolved_version,\n            ):\n                req = build_schedule_new_orchestration_req(\n                    orchestrator, input=input, instance_id=instance_id, start_at=start_at,\n                    reuse_id_policy=reuse_id_policy, tags=tags,\n                    version=version if version else self.default_version,\n                    data_converter=self._data_converter)\n```\n\nNotice that `resolved_instance_id` is passed to `start_create_orchestration_span()`, which records the attribute `durabletask.task.instance_id` on the OpenTelemetry `create_orchestration` producer span.\n\nHowever, `build_schedule_new_orchestration_req()` is passed `instance_id=instance_id` (which is `None` when relying on SDK auto-generation).\n\nInside `build_schedule_new_orchestration_req()`:\n\nhttps://github.com/microsoft/durabletask-python/blob/06bb27763eb893693f1bc300b86a86e01a5fa641/durabletask/internal/client_helpers.py#L86-L94\n\n```python\n    return pb.CreateInstanceRequest(\n        name=name,\n        instanceId=instance_id if instance_id else uuid.uuid4().hex,\n        ...\n    )\n```\n\nBecause `instance_id` is `None`, a **second, completely different random UUID** is generated for `req.instanceId`.\n\nAs a result:\n1. `req.instanceId` is set to UUID #2.\n2. The client logs `Starting new '...' instance with ID = '{req.instanceId}'` with UUID #2.\n3. The sidecar creates the orchestration with UUID #2, which is returned by `schedule_new_orchestration()`.\n4. The worker processes the orchestration with UUID #2.\n5. **Meanwhile, the emitted OpenTelemetry `create_orchestration` span has `durabletask.task.instance_id` set to UUID #1 (`resolved_instance_id`), which does not exist anywhere in the backend.**\n\n---\n\n### Minimal Reproduction\n\n```python\nfrom unittest.mock import MagicMock\nfrom durabletask import client\nfrom durabletask.internal import tracing\n\ncaptured_attrs = {}\n\norig_start = tracing.start_create_orchestration_span\ndef mock_start(name, instance_id, version=None):\n    captured_attrs[\"span_instance_id\"] = instance_id\n    return orig_start(name, instance_id, version)\n\ntracing.start_create_orchestration_span = mock_start\n\nmock_stub = MagicMock()\nmock_stub.StartInstance.side_effect = lambda req: req\n\nc = client.TaskHubGrpcClient(channel=MagicMock())\nc._stub = mock_stub\n\n# Schedule new orchestration without explicit instance_id:\nactual_instance_id = c.schedule_new_orchestration(\"TestOrchestrator\")\n\nprint(\"Span instance_id:   \", captured_attrs[\"span_instance_id\"])\nprint(\"Actual instance_id: \", actual_instance_id)\nprint(\"IDs match?:         \", captured_attrs[\"span_instance_id\"] == actual_instance_id)\n```\n\nOutput:\n```\n2026-11-05 10:47:38.249 durabletask-client INFO: Starting new 'TestOrchestrator' instance with ID = 'f9bf3e536cdb44d0a074f3846cf7f1ef'.\nSpan instance_id:    cda7391a06a24c84809b281ed7614531\nActual instance_id:  f9bf3e536cdb44d0a074f3846cf7f1ef\nIDs match?:          False\n```\n\n---\n\n### Expected Behavior\n\nWhen `instance_id` is not supplied by the caller, the OpenTelemetry producer span and the scheduled `CreateInstanceRequest` must share the exact same generated instance ID.\n\n---\n\n### Impact\n\nDistributed tracing correlation is broken for all orchestrations scheduled without explicit instance IDs (the primary default usage pattern). Queries in Application Insights, Datadog, Jaeger, Grafana Tempo, or OpenTelemetry Collector searching for the instance ID returned by `schedule_new_orchestration()` cannot correlate with the client's `create_orchestration` producer span because it is labeled with a phantom UUID.\n\n---\n\n### Suggested Direction\n\nPass `instance_id=resolved_instance_id` and `version=resolved_version` to `build_schedule_new_orchestration_req()` in both `TaskHubGrpcClient` and `AsyncTaskHubGrpcClient`:\n\n```python\n                req = build_schedule_new_orchestration_req(\n                    orchestrator, input=input, instance_id=resolved_instance_id, start_at=start_at,\n                    reuse_id_policy=reuse_id_policy, tags=tags,\n                    version=resolved_version,\n                    data_converter=self._data_converter)\n```\n\n---\n\ncc @andystaples @berndverst\n","author":{"url":"https://github.com/hardikkaurani","@type":"Person","name":"hardikkaurani"},"datePublished":"2026-11-05T05:19:48Z","url":"https://github.com/microsoft/durabletask-python/issues/343"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:65ca0ec5-63df-3a2b-2e2e-6062ac67e878
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD8E4:2BFDE9:3147A7:40C3D7:6AFE3CDE
html-safe-nonce20282aff0a77a892c14ae1a0c8fca52b717b49fad2c6dcfbf3229d08731b54d8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEU0OjJCRkRFOTozMTQ3QTc6NDBDM0Q3OjZBRkUzQ0RFIiwidmlzaXRvcl9pZCI6IjQ2MzI5MTIxNzgwOTU5OTYxMjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacea3354c28b2ae802521a4438a31cd699e7ccafbba3305b82c2a33ca1041fa963
hovercard-subject-tagissue:6217318282
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/microsoft/durabletask-python/343/issue_layout
twitter:imagehttps://opengraph.githubassets.com/29dff7b59e641f96606c4f7d3bab1aeba84425921d75cad7b75d5f129c93456e/microsoft/durabletask-python/issues/343
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/29dff7b59e641f96606c4f7d3bab1aeba84425921d75cad7b75d5f129c93456e/microsoft/durabletask-python/issues/343
og:image:altProblem Description In TaskHubGrpcClient.schedule_new_orchestration (lines 639-650) and AsyncTaskHubGrpcClient.schedule_new_orchestration (lines 1187-1198), an instance ID is pre-resolved for the O...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehardikkaurani
hostnamegithub.com
expected-hostnamegithub.com
Nonef1a5901e2377b0af2a0b303f9528678f1475d04b9219dca1e993344196eaa07c
turbo-cache-controlno-preview
go-importgithub.com/microsoft/durabletask-python git https://github.com/microsoft/durabletask-python.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id627664515
octolytics-dimension-repository_nwomicrosoft/durabletask-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627664515
octolytics-dimension-repository_network_root_nwomicrosoft/durabletask-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
releasec4447fdce9ed0f33af959d2b6680d0bc18212a6a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/durabletask-python/issues/343#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-python%2Fissues%2F343
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-python%2Fissues%2F343
Sign uphttps://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=microsoft%2Fdurabletask-python
Reloadhttps://github.com/microsoft/durabletask-python/issues/343
Reloadhttps://github.com/microsoft/durabletask-python/issues/343
Reloadhttps://github.com/microsoft/durabletask-python/issues/343
microsofthttps://github.com/microsoft
durabletask-pythonhttps://github.com/microsoft/durabletask-python
Codehttps://github.com/microsoft/durabletask-python
Issues15 (15)https://github.com/microsoft/durabletask-python/issues
Pull requests12 (12)https://github.com/microsoft/durabletask-python/pulls
Actionshttps://github.com/microsoft/durabletask-python/actions
Projectshttps://github.com/microsoft/durabletask-python/projects
Security and qualityhttps://github.com/microsoft/durabletask-python/security
Insightshttps://github.com/microsoft/durabletask-python/insights
https://github.com/microsoft/durabletask-python
New issuehttps://github.com/login?return_to=https://github.com/microsoft/durabletask-python/issues/343
New issuehttps://github.com/login?return_to=https://github.com/microsoft/durabletask-python/issues/343
#345https://github.com/microsoft/durabletask-python/pull/345
TaskHubGrpcClient.schedule_new_orchestration records mismatched instanceId in OpenTelemetry producer span when instance_id is auto-generatedhttps://github.com/microsoft/durabletask-python/issues/343#top
#345https://github.com/microsoft/durabletask-python/pull/345
https://github.com/hardikkaurani
Hardik K (hardikkaurani)https://github.com/hardikkaurani
on Nov 5, 2026https://github.com/microsoft/durabletask-python/issues/343#issue-6217318282
https://github.com/microsoft/durabletask-python/blob/06bb27763eb893693f1bc300b86a86e01a5fa641/durabletask/client.py#L638-L650https://github.com/microsoft/durabletask-python/blob/06bb27763eb893693f1bc300b86a86e01a5fa641/durabletask/client.py#L638-L650
https://github.com/microsoft/durabletask-python/blob/06bb27763eb893693f1bc300b86a86e01a5fa641/durabletask/client.py#L1186-L1198https://github.com/microsoft/durabletask-python/blob/06bb27763eb893693f1bc300b86a86e01a5fa641/durabletask/client.py#L1186-L1198
https://github.com/microsoft/durabletask-python/blob/06bb27763eb893693f1bc300b86a86e01a5fa641/durabletask/internal/client_helpers.py#L86-L94https://github.com/microsoft/durabletask-python/blob/06bb27763eb893693f1bc300b86a86e01a5fa641/durabletask/internal/client_helpers.py#L86-L94
Package reorganization, setup, and samples #2https://github.com/microsoft/durabletask-python/pull/2
Package reorganization, setup, and samples #2https://github.com/microsoft/durabletask-python/pull/2
Package reorganization, setup, and samples #2https://github.com/microsoft/durabletask-python/pull/2
Package reorganization, setup, and samples #2https://github.com/microsoft/durabletask-python/pull/2
Setup PR validator with GitHub actions #1https://github.com/microsoft/durabletask-python/pull/1
andystapleshttps://github.com/andystaples
Bernd Verst (@berndverst)https://github.com/berndverst
andystapleshttps://github.com/andystaples
completedhttps://github.com/microsoft/durabletask-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#345https://github.com/microsoft/durabletask-python/pull/345
on Nov 6, 2026https://github.com/microsoft/durabletask-python/issues/343#event-35377901182
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/durabletask-python/issues/343
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/durabletask-python/issues/343
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.