Skip to content

Conversation

@arslanashraf7
Copy link
Contributor

What are the relevant tickets?

https://github.com/mitodl/hq/issues/9264

Description (What does it do?)

  • Adds additional fields in tracking events where applicable. The events will additionally have values for thread_id and checkpoint_pk extracted from the content sent to the tracking events handler.

The event would now look like:

2025-12-02 09:43:23,218 INFO 218 [tracking] [user 4] [ip 172.20.0.1] logger.py:41 - {"name": "ol_openedx_chat.drawer.response", "context": {"course_id": "course-v1:Org+CAT+1", "course_user_tags": {}, "user_id": 4, "path": "/courses/course-v1:Org+CAT+1/xblock/aside-usage-v2:block-v1$:Org+CAT+1+type@problem+block@39ac594780a54bc2804ac3da86507264::ol_openedx_chat/handler/track_user_events", "org_id": "Org", "enterprise_uuid": "", "module": {"display_name": "Single select", "usage_key": "block-v1:Org+CAT+1+type@problem+block@39ac594780a54bc2804ac3da86507264"}}, "username": "edx", "session": "2ee80bc4ceb9e8ca4aeca7e85debd271", "ip": "172.20.0.1", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36", "host": "local.openedx.io:8000", "referer": "http://apps.local.openedx.io:2000/", "accept_language": "en-US,en;q=0.9”, 
"event": {"value": "Hello! I'm here to help you with your math problem. If you have any questions related to the problem set, feel free to ask, and I'll do my best to guide you.<!-- {\"edx_module_id\": \"block-v1:Org+CAT+1+type@problem+block@39ac594780a54bc2804ac3da86507264\", \"block_siblings\": [\"block-v1:Org+CAT+1+type@video+block@448ced963d50444a8f171e7877ed447b\", \"block-v1:Org+CAT+1+type@problem+block@39ac594780a54bc2804ac3da86507264\"], \"problem\": \"\", \"problem_set\": \"\", \"problem_set_title\": null, \"run_readable_id\": null, \"checkpoint_pk\": 1010101, \"thread_id\": \"c3e6d520b37f4c16b5289d\"} -->", "blockUsageKey": "block-v1:Org+CAT+1+type@problem+block@39ac594780a54bc2804ac3da86507264", "thread_id": "c3e6d520b37f4c16b5289d", "checkpoint_pk": "1010101"}, "time": "2025-12-02T09:43:23.218124+00:00", "event_type": "ol_openedx_chat.drawer.response", "event_source": "server", "page": null}

Screenshots (if appropriate):

  • Desktop screenshots
  • Mobile width screenshots

How can this be tested?

  • Setup chat aside in your edX environment
  • The chat should be working properly, so you will need appriate keys to get them working
  • Perform chat and notice the tracking events in the logs
  • The tracking events should contain values for thread_id and checkpoint_pk explicitely in the payload and not just the content.

Additional Context

@arslanashraf7 arslanashraf7 marked this pull request as ready for review December 2, 2025 13:26
@arslanashraf7 arslanashraf7 force-pushed the arslan/9264-add-thread-checkpoint branch from 16f92a0 to 2e4a04f Compare December 3, 2025 10:20
@arslanashraf7 arslanashraf7 self-assigned this Dec 3, 2025
@arslanashraf7 arslanashraf7 removed their assignment Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants