openedx / openedx-events

Open edX events from the Hooks Extensions Framework
Apache License 2.0
11 stars 21 forks source link

feat: use new setting to set ce_source #305

Closed rgraber closed 9 months ago

rgraber commented 9 months ago

Description: Use a new EVENTS_SERVICE_NAME setting to determine the source in EventsMetadata. Defaults to the old SERVICE_VARIANT setting if not set. SERVICE_VARIANT is usually only set on lms or cms, and has other uses, so it makes sense to have a new variable that all services can use for the events.

I didn't talk about how the EVENTS_SERVICE_NAME will be used to set the client id because that is Kafka specific.

Testing instructions: pip install -e openedx-events set EVENTS_SERVICE_NAME in your service settings fire an event check that the event source is openedx//web

Reviewers:

Merge checklist:

Post merge:

Author concerns: List any concerns about this PR - inelegant solutions, hacks, quick-and-dirty implementations, concerns about migrations, etc.