{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":61572326,"defaultBranch":"main","name":"dd-trace-py","ownerLogin":"DataDog","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2016-06-20T18:52:23.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/365230?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1716592111.0","currentOid":""},"activityList":{"items":[{"before":"66057457b3e43a7a0ccf90746e4a234cf7860c92","after":"28f6a8fe76a6e29bdb34ae5bd9f3a7952e8c4ea6","ref":"refs/heads/munir/support-error-events","pushedAt":"2024-05-24T23:43:08.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mabdinur","name":"Munir Abdinur","path":"/mabdinur","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/62392438?s=80&v=4"},"commit":{"message":"revert regression","shortMessageHtmlLink":"revert regression"}},{"before":"ced3107fbb191b64a09c3fd8dcaa398a0ca0fc97","after":"66057457b3e43a7a0ccf90746e4a234cf7860c92","ref":"refs/heads/munir/support-error-events","pushedAt":"2024-05-24T23:42:34.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"mabdinur","name":"Munir Abdinur","path":"/mabdinur","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/62392438?s=80&v=4"},"commit":{"message":"set error message on record exception","shortMessageHtmlLink":"set error message on record exception"}},{"before":"fadc2c1b462653d586893a72bff22770ce6526f8","after":"ced3107fbb191b64a09c3fd8dcaa398a0ca0fc97","ref":"refs/heads/munir/support-error-events","pushedAt":"2024-05-24T23:38:58.000Z","pushType":"push","commitsCount":8,"pusher":{"login":"mabdinur","name":"Munir Abdinur","path":"/mabdinur","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/62392438?s=80&v=4"},"commit":{"message":"Merge branch 'main' into munir/support-error-events","shortMessageHtmlLink":"Merge branch 'main' into munir/support-error-events"}},{"before":"0d682aed4aa153a5b56660ff23c08a881b8d17b2","after":"dd34406dad3e40510dad9ea17f71a7fe92c14020","ref":"refs/heads/yunkim/llmobs-patch-all","pushedAt":"2024-05-24T23:22:54.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"fix llmobs service tests","shortMessageHtmlLink":"fix llmobs service tests"}},{"before":null,"after":"e19c5c825ffb92cc35e3ee49ad587049b2ee75eb","ref":"refs/heads/backport-9387-to-2.9","pushedAt":"2024-05-24T23:08:31.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"github-actions[bot]","name":null,"path":"/apps/github-actions","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/15368?s=80&v=4"},"commit":{"message":"fix(llmobs): fix propagation memory usage (#9387)\n\nThis PR is a follow up of #9152, and attempts to minimize any added\nmemory overhead by moving the `llmobs` utility import to inside the\nconditional check that `LLMObs` is enabled.\n\nBy importing inside the `ddtrace.llmobs.` directory we are implicitly\nrunning the `ddtrace.llmobs.__init__.py` code, which involves\ninstantiating a `LLMObs` instance. This is likely the largest culprit of\nthe memory overhead.\n\nMoving the import to only happening if LLMObs is enabled should avoid\nthat added overhead, given that LLMObs is only running in a select few\ncustomer applications at the moment.\n\n## Checklist\n\n- [x] Change(s) are motivated and described in the PR description\n- [x] Testing strategy is described if automated tests are not included\nin the PR\n- [x] Risks are described (performance impact, potential for breakage,\nmaintainability)\n- [x] Change is maintainable (easy to change, telemetry, documentation)\n- [x] [Library release note\nguidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)\nare followed or label `changelog/no-changelog` is set\n- [x] Documentation is included (in-code, generated user docs, [public\ncorp docs](https://github.com/DataDog/documentation/))\n- [x] Backport labels are set (if\n[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))\n- [x] If this PR changes the public interface, I've notified\n`@DataDog/apm-tees`.\n\n## Reviewer Checklist\n\n- [x] Title is accurate\n- [x] All changes are related to the pull request's stated goal\n- [x] Description motivates each change\n- [x] Avoids breaking\n[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)\nchanges\n- [x] Testing strategy adequately addresses listed risks\n- [x] Change is maintainable (easy to change, telemetry, documentation)\n- [x] Release note makes sense to a user of the library\n- [x] Author has acknowledged and discussed the performance implications\nof this PR as reported in the benchmarks PR comment\n- [x] Backport labels are set in a manner that is consistent with the\n[release branch maintenance\npolicy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)\n\n(cherry picked from commit be9936b5e0205f1f0b3bd3ab0fd28ef7a4763115)","shortMessageHtmlLink":"fix(llmobs): fix propagation memory usage (#9387)"}},{"before":"d1553bcaf404d9f43b91dde1443821f17824988d","after":null,"ref":"refs/heads/yunkim/llmobs-parent-id-fix","pushedAt":"2024-05-24T23:08:17.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"}},{"before":"1b954deef6fd1eeb3e26b7298bbebdee26d24918","after":"be9936b5e0205f1f0b3bd3ab0fd28ef7a4763115","ref":"refs/heads/main","pushedAt":"2024-05-24T23:08:16.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"fix(llmobs): fix propagation memory usage (#9387)\n\nThis PR is a follow up of #9152, and attempts to minimize any added\r\nmemory overhead by moving the `llmobs` utility import to inside the\r\nconditional check that `LLMObs` is enabled.\r\n\r\nBy importing inside the `ddtrace.llmobs.` directory we are implicitly\r\nrunning the `ddtrace.llmobs.__init__.py` code, which involves\r\ninstantiating a `LLMObs` instance. This is likely the largest culprit of\r\nthe memory overhead.\r\n\r\nMoving the import to only happening if LLMObs is enabled should avoid\r\nthat added overhead, given that LLMObs is only running in a select few\r\ncustomer applications at the moment.\r\n\r\n## Checklist\r\n\r\n- [x] Change(s) are motivated and described in the PR description\r\n- [x] Testing strategy is described if automated tests are not included\r\nin the PR\r\n- [x] Risks are described (performance impact, potential for breakage,\r\nmaintainability)\r\n- [x] Change is maintainable (easy to change, telemetry, documentation)\r\n- [x] [Library release note\r\nguidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)\r\nare followed or label `changelog/no-changelog` is set\r\n- [x] Documentation is included (in-code, generated user docs, [public\r\ncorp docs](https://github.com/DataDog/documentation/))\r\n- [x] Backport labels are set (if\r\n[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))\r\n- [x] If this PR changes the public interface, I've notified\r\n`@DataDog/apm-tees`.\r\n\r\n## Reviewer Checklist\r\n\r\n- [x] Title is accurate\r\n- [x] All changes are related to the pull request's stated goal\r\n- [x] Description motivates each change\r\n- [x] Avoids breaking\r\n[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)\r\nchanges\r\n- [x] Testing strategy adequately addresses listed risks\r\n- [x] Change is maintainable (easy to change, telemetry, documentation)\r\n- [x] Release note makes sense to a user of the library\r\n- [x] Author has acknowledged and discussed the performance implications\r\nof this PR as reported in the benchmarks PR comment\r\n- [x] Backport labels are set in a manner that is consistent with the\r\n[release branch maintenance\r\npolicy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)","shortMessageHtmlLink":"fix(llmobs): fix propagation memory usage (#9387)"}},{"before":"41948d569f9f0b877cf339fe0130f1d079e690ed","after":"0d682aed4aa153a5b56660ff23c08a881b8d17b2","ref":"refs/heads/yunkim/llmobs-patch-all","pushedAt":"2024-05-24T23:05:01.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"fix llmobs service tests","shortMessageHtmlLink":"fix llmobs service tests"}},{"before":"6a0a59e47686110c05e85059f791ab07a8eec9a1","after":"41948d569f9f0b877cf339fe0130f1d079e690ed","ref":"refs/heads/yunkim/llmobs-patch-all","pushedAt":"2024-05-24T22:55:59.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"fix llmobs service tests","shortMessageHtmlLink":"fix llmobs service tests"}},{"before":"cc4c73cf7f389f843bc84321ec85ac4ee814d018","after":"6a0a59e47686110c05e85059f791ab07a8eec9a1","ref":"refs/heads/yunkim/llmobs-patch-all","pushedAt":"2024-05-24T22:51:58.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"fix llmobs service tests","shortMessageHtmlLink":"fix llmobs service tests"}},{"before":"b29a744c4ef5ae0662f2dfaaa73ea645a267956f","after":"cc4c73cf7f389f843bc84321ec85ac4ee814d018","ref":"refs/heads/yunkim/llmobs-patch-all","pushedAt":"2024-05-24T22:50:38.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"fix llmobs service tests","shortMessageHtmlLink":"fix llmobs service tests"}},{"before":"1eeb2893fa7d14d30c6df75cdb2887b2f2549e04","after":"d1553bcaf404d9f43b91dde1443821f17824988d","ref":"refs/heads/yunkim/llmobs-parent-id-fix","pushedAt":"2024-05-24T22:42:50.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"Merge branch 'main' into yunkim/llmobs-parent-id-fix","shortMessageHtmlLink":"Merge branch 'main' into yunkim/llmobs-parent-id-fix"}},{"before":"e44a9e103089a81ca62cfefb5c78b6d020b4cedc","after":"b29a744c4ef5ae0662f2dfaaa73ea645a267956f","ref":"refs/heads/yunkim/llmobs-patch-all","pushedAt":"2024-05-24T22:40:17.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"Revert patch_all to patch only llmobs integrations, split out llmobs tests from integrations","shortMessageHtmlLink":"Revert patch_all to patch only llmobs integrations, split out llmobs …"}},{"before":null,"after":"a3750b17a4278f11b9a8ca09989f46c595f9b63e","ref":"refs/heads/backport-9112-to-2.9","pushedAt":"2024-05-24T22:34:19.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"github-actions[bot]","name":null,"path":"/apps/github-actions","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/15368?s=80&v=4"},"commit":{"message":"fix(tracing): fix traceback max size for exceptions (#9112)\n\nhttps://github.com/DataDog/dd-trace-py/pull/7558 made the traceback size\nconfigurable via `DD_SPAN_TRACEBACK_MAX_SIZE`, but tracebacks for\nexceptions were still hardcoded with a limit of 30.\n\nThe fix is modeled after `Span#set_traceback`'s existing logic, and\ntests were modeled after both `test_traceback_with_error` and\n`test_custom_traceback_size`. Not much new logic, just an edge case.\n\n## Checklist\n\n- [x] Change(s) are motivated and described in the PR description\n- [x] Testing strategy is described if automated tests are not included\nin the PR\n- [x] Risks are described (performance impact, potential for breakage,\nmaintainability)\n- [x] Change is maintainable (easy to change, telemetry, documentation)\n- [x] [Library release note\nguidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)\nare followed or label `changelog/no-changelog` is set\n- [x] Documentation is included (in-code, generated user docs, [public\ncorp docs](https://github.com/DataDog/documentation/))\n- [x] Backport labels are set (if\n[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))\n- [x] If this PR changes the public interface, I've notified\n`@DataDog/apm-tees`.\n\n## Reviewer Checklist\n\n- [x] Title is accurate\n- [x] All changes are related to the pull request's stated goal\n- [x] Description motivates each change\n- [x] Avoids breaking\n[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)\nchanges\n- [x] Testing strategy adequately addresses listed risks\n- [x] Change is maintainable (easy to change, telemetry, documentation)\n- [x] Release note makes sense to a user of the library\n- [x] Author has acknowledged and discussed the performance implications\nof this PR as reported in the benchmarks PR comment\n- [x] Backport labels are set in a manner that is consistent with the\n[release branch maintenance\npolicy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)\n\nCo-authored-by: erikayasuda <153395705+erikayasuda@users.noreply.github.com>\n(cherry picked from commit 1b954deef6fd1eeb3e26b7298bbebdee26d24918)","shortMessageHtmlLink":"fix(tracing): fix traceback max size for exceptions (#9112)"}},{"before":null,"after":"90a7c53516196e12c9a4a0b80f7ee27593c7505e","ref":"refs/heads/backport-9112-to-2.8","pushedAt":"2024-05-24T22:34:16.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"github-actions[bot]","name":null,"path":"/apps/github-actions","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/15368?s=80&v=4"},"commit":{"message":"fix(tracing): fix traceback max size for exceptions (#9112)\n\nhttps://github.com/DataDog/dd-trace-py/pull/7558 made the traceback size\nconfigurable via `DD_SPAN_TRACEBACK_MAX_SIZE`, but tracebacks for\nexceptions were still hardcoded with a limit of 30.\n\nThe fix is modeled after `Span#set_traceback`'s existing logic, and\ntests were modeled after both `test_traceback_with_error` and\n`test_custom_traceback_size`. Not much new logic, just an edge case.\n\n## Checklist\n\n- [x] Change(s) are motivated and described in the PR description\n- [x] Testing strategy is described if automated tests are not included\nin the PR\n- [x] Risks are described (performance impact, potential for breakage,\nmaintainability)\n- [x] Change is maintainable (easy to change, telemetry, documentation)\n- [x] [Library release note\nguidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)\nare followed or label `changelog/no-changelog` is set\n- [x] Documentation is included (in-code, generated user docs, [public\ncorp docs](https://github.com/DataDog/documentation/))\n- [x] Backport labels are set (if\n[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))\n- [x] If this PR changes the public interface, I've notified\n`@DataDog/apm-tees`.\n\n## Reviewer Checklist\n\n- [x] Title is accurate\n- [x] All changes are related to the pull request's stated goal\n- [x] Description motivates each change\n- [x] Avoids breaking\n[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)\nchanges\n- [x] Testing strategy adequately addresses listed risks\n- [x] Change is maintainable (easy to change, telemetry, documentation)\n- [x] Release note makes sense to a user of the library\n- [x] Author has acknowledged and discussed the performance implications\nof this PR as reported in the benchmarks PR comment\n- [x] Backport labels are set in a manner that is consistent with the\n[release branch maintenance\npolicy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)\n\nCo-authored-by: erikayasuda <153395705+erikayasuda@users.noreply.github.com>\n(cherry picked from commit 1b954deef6fd1eeb3e26b7298bbebdee26d24918)","shortMessageHtmlLink":"fix(tracing): fix traceback max size for exceptions (#9112)"}},{"before":null,"after":"ec338ea864cd90ef6317f5955d1b2edd1f577941","ref":"refs/heads/backport-9112-to-2.7","pushedAt":"2024-05-24T22:34:13.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"github-actions[bot]","name":null,"path":"/apps/github-actions","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/15368?s=80&v=4"},"commit":{"message":"fix(tracing): fix traceback max size for exceptions (#9112)\n\nhttps://github.com/DataDog/dd-trace-py/pull/7558 made the traceback size\nconfigurable via `DD_SPAN_TRACEBACK_MAX_SIZE`, but tracebacks for\nexceptions were still hardcoded with a limit of 30.\n\nThe fix is modeled after `Span#set_traceback`'s existing logic, and\ntests were modeled after both `test_traceback_with_error` and\n`test_custom_traceback_size`. Not much new logic, just an edge case.\n\n## Checklist\n\n- [x] Change(s) are motivated and described in the PR description\n- [x] Testing strategy is described if automated tests are not included\nin the PR\n- [x] Risks are described (performance impact, potential for breakage,\nmaintainability)\n- [x] Change is maintainable (easy to change, telemetry, documentation)\n- [x] [Library release note\nguidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)\nare followed or label `changelog/no-changelog` is set\n- [x] Documentation is included (in-code, generated user docs, [public\ncorp docs](https://github.com/DataDog/documentation/))\n- [x] Backport labels are set (if\n[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))\n- [x] If this PR changes the public interface, I've notified\n`@DataDog/apm-tees`.\n\n## Reviewer Checklist\n\n- [x] Title is accurate\n- [x] All changes are related to the pull request's stated goal\n- [x] Description motivates each change\n- [x] Avoids breaking\n[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)\nchanges\n- [x] Testing strategy adequately addresses listed risks\n- [x] Change is maintainable (easy to change, telemetry, documentation)\n- [x] Release note makes sense to a user of the library\n- [x] Author has acknowledged and discussed the performance implications\nof this PR as reported in the benchmarks PR comment\n- [x] Backport labels are set in a manner that is consistent with the\n[release branch maintenance\npolicy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)\n\nCo-authored-by: erikayasuda <153395705+erikayasuda@users.noreply.github.com>\n(cherry picked from commit 1b954deef6fd1eeb3e26b7298bbebdee26d24918)","shortMessageHtmlLink":"fix(tracing): fix traceback max size for exceptions (#9112)"}},{"before":"b105edbd8583a90135367f3665e9571c3ffd1044","after":"1b954deef6fd1eeb3e26b7298bbebdee26d24918","ref":"refs/heads/main","pushedAt":"2024-05-24T22:33:56.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"erikayasuda","name":null,"path":"/erikayasuda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/153395705?s=80&v=4"},"commit":{"message":"fix(tracing): fix traceback max size for exceptions (#9112)\n\nhttps://github.com/DataDog/dd-trace-py/pull/7558 made the traceback size\r\nconfigurable via `DD_SPAN_TRACEBACK_MAX_SIZE`, but tracebacks for\r\nexceptions were still hardcoded with a limit of 30.\r\n\r\nThe fix is modeled after `Span#set_traceback`'s existing logic, and\r\ntests were modeled after both `test_traceback_with_error` and\r\n`test_custom_traceback_size`. Not much new logic, just an edge case.\r\n\r\n## Checklist\r\n\r\n- [x] Change(s) are motivated and described in the PR description\r\n- [x] Testing strategy is described if automated tests are not included\r\nin the PR\r\n- [x] Risks are described (performance impact, potential for breakage,\r\nmaintainability)\r\n- [x] Change is maintainable (easy to change, telemetry, documentation)\r\n- [x] [Library release note\r\nguidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)\r\nare followed or label `changelog/no-changelog` is set\r\n- [x] Documentation is included (in-code, generated user docs, [public\r\ncorp docs](https://github.com/DataDog/documentation/))\r\n- [x] Backport labels are set (if\r\n[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))\r\n- [x] If this PR changes the public interface, I've notified\r\n`@DataDog/apm-tees`.\r\n\r\n## Reviewer Checklist\r\n\r\n- [x] Title is accurate\r\n- [x] All changes are related to the pull request's stated goal\r\n- [x] Description motivates each change\r\n- [x] Avoids breaking\r\n[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)\r\nchanges\r\n- [x] Testing strategy adequately addresses listed risks\r\n- [x] Change is maintainable (easy to change, telemetry, documentation)\r\n- [x] Release note makes sense to a user of the library\r\n- [x] Author has acknowledged and discussed the performance implications\r\nof this PR as reported in the benchmarks PR comment\r\n- [x] Backport labels are set in a manner that is consistent with the\r\n[release branch maintenance\r\npolicy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)\r\n\r\nCo-authored-by: erikayasuda <153395705+erikayasuda@users.noreply.github.com>","shortMessageHtmlLink":"fix(tracing): fix traceback max size for exceptions (#9112)"}},{"before":"825516013101a91f2c5deadad154e8c51f11741c","after":"1eeb2893fa7d14d30c6df75cdb2887b2f2549e04","ref":"refs/heads/yunkim/llmobs-parent-id-fix","pushedAt":"2024-05-24T22:28:29.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"move expensive import to only conditional check","shortMessageHtmlLink":"move expensive import to only conditional check"}},{"before":"d88a7bbf1c38d127909cde1a6fa9a584e5bb80ee","after":"e44a9e103089a81ca62cfefb5c78b6d020b4cedc","ref":"refs/heads/yunkim/llmobs-patch-all","pushedAt":"2024-05-24T22:27:49.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"Revert patch_all to patch only llmobs integrations, split out llmobs tests from integrations","shortMessageHtmlLink":"Revert patch_all to patch only llmobs integrations, split out llmobs …"}},{"before":null,"after":"e223577e6e592ce33408f90b632ba90db2377117","ref":"refs/heads/erikayasuda/delay-dogfood","pushedAt":"2024-05-24T22:00:23.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"erikayasuda","name":null,"path":"/erikayasuda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/153395705?s=80&v=4"},"commit":{"message":"delay dogfood stage until after benchmarks, so that benchmarks will always run and not be blocked on dogfooding succeeding","shortMessageHtmlLink":"delay dogfood stage until after benchmarks, so that benchmarks will a…"}},{"before":"19ffd07b3c379340ff2250ab6881331fa5a3898a","after":"044472dd52942afe6a58990d39781153e9d298a0","ref":"refs/heads/backport-9380-to-2.9","pushedAt":"2024-05-24T21:52:27.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"erikayasuda","name":null,"path":"/erikayasuda","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/153395705?s=80&v=4"},"commit":{"message":"Merge branch '2.9' into backport-9380-to-2.9","shortMessageHtmlLink":"Merge branch '2.9' into backport-9380-to-2.9"}},{"before":"2ccc117961de039ba4dfa820d2460c1c9556720b","after":"825516013101a91f2c5deadad154e8c51f11741c","ref":"refs/heads/yunkim/llmobs-parent-id-fix","pushedAt":"2024-05-24T21:51:07.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"move expensive import to only conditional check","shortMessageHtmlLink":"move expensive import to only conditional check"}},{"before":"50e8441fbc896a9250fc4748fd68d44fb1874a0f","after":null,"ref":"refs/heads/backport-9152-to-2.9","pushedAt":"2024-05-24T21:41:47.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"}},{"before":"26c2ac58f7a361ba14a3e4154b054b5a341b4249","after":"57bea6001aa5e2bf0fbbf13cd620c687fba3a0ff","ref":"refs/heads/2.9","pushedAt":"2024-05-24T21:41:47.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"feat(llmobs): support distributed tracing [backport 2.9] (#9385)\n\nBackport 9b632b75b38b7611ad14008aea506cb632a73d43 from #9152 to 2.9.\r\n\r\n### TLDR for Reviewers\r\nThis PR adds support for distributed tracing for LLM Observability, by\r\npropagating a LLMObs parent ID tag on distributed requests. Note that\r\nthe notion of a `LLMObs parent ID != APM parent ID` because we only\r\nsubmit `llm` type spans to LLM Observability.\r\n\r\nThe files to review are (in order of importance):\r\n- `ddtrace/propagation/http.py` - inject LLMobs parent ID in distributed\r\ncontexts\r\n- `ddtrace/llmobs/_utils.py` - implementation details of how we\r\ndetermine / inject LLMObs parent ID\r\n- `ddtrace/llmobs/_llmobs.py` - add edge case handling, explained below\r\n- `tests/llmobs/test_propagation.py` - test cases showing (hopefully)\r\nwhat is expected behavior\r\n- `tests/tracer/test_propagation.py` - test cases for general\r\npropagation cases, mostly ensuring that our behavior can be turned\r\non/off.\r\n\r\n## Context\r\n\r\n### LLM Obs parent ID\r\nLLM Observability workflows involve marking tracer-generated spans with\r\na specific `llm` span type, then extracting information from the given\r\nspan (such as span ID, trace ID, start/end timestamps, errors, etc) to\r\ncreate a LLMObs-specific span event to be submitted to LLM Obs.\r\n\r\nHowever since LLM Obs only accepts spans of type `llm` (or spans\r\ngenerated by the `openai/langchain/bedrock` integrations), we do not\r\nsend other auto-generated spans to LLM Obs. This means that parent IDs\r\ncan get tricky, especially in cases with non-LLMObs spans sprinkled\r\nbetween LLMObs spans (see example below):\r\n\r\n```\r\nSpan 1 (LLM Obs)\r\n|--> Span 2 (Non-LLM Obs)\r\n | --> Span 3 (LLM Obs) \r\n```\r\nTechnically span 3's parent is span 2, but since we only submit LLMObs\r\ntype spans to LLM Obs (i.e. span 1 and span 3), LLM Observability's\r\ntrace structure breaks down as it has no information about span 2.\r\nTherefore, we need to set span 3's *llmobs_parent_id* to be span 1, in\r\nother words the nearest ancestor of type `llm`.\r\n\r\nThe current solution is to go up the span's ancestor tree (which is\r\nconnected via `span._parent`) until we hit a span of type `llm`, and use\r\nthat span's span ID as the *llmobs_parent_id*. This works fine in most\r\ncases, except for distributed scenarios.\r\n\r\n### Problem in distributed tracing\r\n\r\nIn distributed scenarios, a trace can encompass multiple services\r\nconnected via requests. However, while the immediate trace/parent IDs\r\nare automatically propagated on request headers, we have no access to\r\nthe spans beyond the immediate parent, i.e. `span._parent is None`. This\r\nmeans that in distributed scenarios involving LLMObs spans, the first\r\nLLMObs span in each service will consider itself the root.\r\n\r\n```\r\n===================== Service A\r\nSpan 1 (LLM Obs)\r\n|--> Span 2 (Non-LLM Obs)\r\n===================== Service B (No access to spans from service A, just distributed request headers)\r\n | --> Span 3 (LLM Obs) \r\n```\r\n## Solution\r\n\r\nThis PR adds three things:\r\n1. Injects the context propagated in a distributed request with the\r\n*llmobs_parent_id*.\r\n\r\nBy injecting the context with `_dd.p.llmobs_parent_id`, this will\r\nautomatically be propagated on distributed request\r\nheaders/tracecontexts, then be tagged on all spans in the next called\r\nservice at span start. Note that at span finish time in the original\r\nservice, the `_dd.p.llmobs_parent_id` tag also gets set on the local\r\nroot span as well.\r\n\r\n2. On LLMObs manual span startup, if there are no propagated parent IDs\r\non the span, we assume that it is the first service in a distributed\r\ntrace, i.e. set the span's *llmobs_parent_id* parent ID manually as a\r\ntag.\r\n\r\nSince `_dd.p.llmobs_parent_id` tags are set at span finish time in the\r\noriginal service, we need to add this manual check to avoid relying\r\nexclusively on the propagated `_dd.p.llmobs_parent_id` tag for\r\nnon-distributed cases or spans in the original service.\r\n \r\n3. On span processing to be exported to LLMObs, do three checks:\r\n- Check if the span has manually set `_ml_obs.parent_id` tags. If so,\r\nuse that as the parent ID.\r\n- Go up the span's ancestor tree to find the nearest LLMObs type\r\nancestor span. If we find one, then use its span ID as the parent ID.\r\n- If no spans are available in the ancestor tree, then it must be a\r\ndistributed case. Use the local root span (i.e. the first span in the\r\nservice)'s propagated `_dd.p.llmobs_parent_id` tag as the parent ID.\r\n\r\n## Testing\r\nUnit tests were added to ensure injection is performed as expected when\r\ncalled explicitly. However, there are some manual local testing that was\r\nperformed to ensure that propagation does indeed happen as expected,\r\nwith 3 test services (A which calls B, which calls C), all of which were\r\ninstrumented with an LLMObs span, running using `FastAPI` and making\r\nrequests via the `requests` library.\r\n\r\n### APM Trace (for context)\r\n\"Screenshot\r\nThis trace includes non-LLMObs spans, including FastAPI spans, requests\r\nspans, and manually constructed `APM` spans.\r\n\r\n### LLMObs trace(s) before changes\r\n\"Screenshot\r\n\"Screenshot\r\nAll LLMObs spans in each service are the roots of their own trace.\r\n\r\n### LLMObs trace after changes\r\n\"Screenshot\r\nAll spans in the distributed trace are collected together in LLMObs.\r\n\r\n## Considerations\r\nThis solution relies on using the `_dd.p.*` context tag propagation for\r\ndistributed traces in the tracer internals. However, one caveat of using\r\nthis internal functionality is that the context tag not only gets\r\npropagated in the request to the spans in the next service at span start\r\ntime, but this also gets set on the local root span in the original\r\nservice at span finish time. This is the reason for manually adding a\r\n`_ml_obs.parent_id` tag in these cases, which takes precedence over the\r\npropagated `_dd.p.llmobs_parent_id` tag.\r\n\r\nAdditionally, this PR ensures that when `LLMObs.enable()` is called, we\r\nimplicitly patch the below distributed tracing integrations, as they are\r\nrequired for propagating llmobs parent IDs via distributed request\r\nheaders. Note that we only support distributed tracing through our\r\ncurrent list of supported request integrations, including:\r\n- \"aiohttp\",\r\n- \"asgi\",\r\n- \"bottle\",\r\n- \"celery\",\r\n- \"cherrypy\",\r\n- \"django\",\r\n- \"falcon\",\r\n- \"fastapi\",\r\n- \"flask\",\r\n- \"grpc\",\r\n- \"httplib\",\r\n- \"httpx\",\r\n- \"molten\",\r\n- \"pyramid\",\r\n- \"requests\",\r\n- \"rq\",\r\n- \"sanic\",\r\n- \"starlette\",\r\n- \"tornado\",\r\n- \"urllib3\",\r\n- \"wsgi\"\r\n\r\nFor users that make requests outside of these libraries, we do not\r\nprovide support for distributed tracing currently. We will need to\r\ncreate a custom `LLMObsPropagator` class to enable them to\r\ninject/extract the parent IDs, similar to how ddtrace documents here:\r\nhttps://ddtrace.readthedocs.io/en/stable/advanced_usage.html#custom\r\n\r\n\r\n## Checklist\r\n\r\n- [x] Change(s) are motivated and described in the PR description\r\n- [x] Testing strategy is described if automated tests are not included\r\nin the PR\r\n- [x] Risks are described (performance impact, potential for breakage,\r\nmaintainability)\r\n- [x] Change is maintainable (easy to change, telemetry, documentation)\r\n- [x] [Library release note\r\nguidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)\r\nare followed or label `changelog/no-changelog` is set\r\n- [x] Documentation is included (in-code, generated user docs, [public\r\ncorp docs](https://github.com/DataDog/documentation/))\r\n- [x] Backport labels are set (if\r\n[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))\r\n- [x] If this PR changes the public interface, I've notified\r\n`@DataDog/apm-tees`.\r\n\r\n## Reviewer Checklist\r\n\r\n- [x] Title is accurate\r\n- [x] All changes are related to the pull request's stated goal\r\n- [x] Description motivates each change\r\n- [x] Avoids breaking\r\n[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)\r\nchanges\r\n- [x] Testing strategy adequately addresses listed risks\r\n- [x] Change is maintainable (easy to change, telemetry, documentation)\r\n- [x] Release note makes sense to a user of the library\r\n- [x] Author has acknowledged and discussed the performance implications\r\nof this PR as reported in the benchmarks PR comment\r\n- [x] Backport labels are set in a manner that is consistent with the\r\n[release branch maintenance\r\npolicy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)\r\n\r\nCo-authored-by: Yun Kim <35776586+Yun-Kim@users.noreply.github.com>","shortMessageHtmlLink":"feat(llmobs): support distributed tracing [backport 2.9] (#9385)"}},{"before":"19f9bd7a38fe52b4a64a49dbb8d80fc19c0d39d1","after":"9cd0322532073ddce1a54b2ade0ad810cb2d428e","ref":"refs/heads/evan.li/langchain-workflow-fix","pushedAt":"2024-05-24T21:14:13.000Z","pushType":"push","commitsCount":20,"pusher":{"login":"lievan","name":null,"path":"/lievan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/42917263?s=80&v=4"},"commit":{"message":"merge conf","shortMessageHtmlLink":"merge conf"}},{"before":"99333d637cfb4c0722670dff05521ee1f54794ee","after":"19f9bd7a38fe52b4a64a49dbb8d80fc19c0d39d1","ref":"refs/heads/evan.li/langchain-workflow-fix","pushedAt":"2024-05-24T21:10:46.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"lievan","name":null,"path":"/lievan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/42917263?s=80&v=4"},"commit":{"message":"address comments","shortMessageHtmlLink":"address comments"}},{"before":"5498bae05021360a716e5b63955fe96776a58eec","after":"99333d637cfb4c0722670dff05521ee1f54794ee","ref":"refs/heads/evan.li/langchain-workflow-fix","pushedAt":"2024-05-24T20:55:04.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"lievan","name":null,"path":"/lievan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/42917263?s=80&v=4"},"commit":{"message":"more comprehensive testings","shortMessageHtmlLink":"more comprehensive testings"}},{"before":"503bef24c144c1e58a9af69c345d3c3786cf44cb","after":null,"ref":"refs/heads/yunkim/llmobs-parent-id","pushedAt":"2024-05-24T20:50:04.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"}},{"before":null,"after":"2ccc117961de039ba4dfa820d2460c1c9556720b","ref":"refs/heads/yunkim/llmobs-parent-id-fix","pushedAt":"2024-05-24T20:49:30.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"test wip","shortMessageHtmlLink":"test wip"}},{"before":null,"after":"503bef24c144c1e58a9af69c345d3c3786cf44cb","ref":"refs/heads/yunkim/llmobs-parent-id","pushedAt":"2024-05-24T20:49:26.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"Yun-Kim","name":"Yun Kim","path":"/Yun-Kim","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/35776586?s=80&v=4"},"commit":{"message":"Set LLMObs parent ID as the nearest LLMObs span in ancestor tree, add\ntests","shortMessageHtmlLink":"Set LLMObs parent ID as the nearest LLMObs span in ancestor tree, add"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEU3hsuwA","startCursor":null,"endCursor":null}},"title":"Activity · DataDog/dd-trace-py"}