Skip to content

Instantly share code, notes, and snippets.

@dpetzel dpetzel/gist:5758291
Last active Dec 18, 2015

What would you like to do?
# Assume your Event was "MyCoolApp Tossed An Error"
import re
if getattr(evt, "datasourceId", None) is not None:
# Start with any characters up to the first space. Save the capture as variable named app_name
re_string = "^(?P<app_name>.*?)\s.*?"
m =, evt.datasourceId)
if m and'app_name'):
app_name ='app_name')
# Now set the component equal to the app name
evt.component = app_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.