Skip to content

Commit

Permalink
Merge pull request #687 from luzonghaoa/patch-1
Browse files Browse the repository at this point in the history
Update replay.py
  • Loading branch information
sathiish-kumar committed May 10, 2023
2 parents 11b5785 + a335044 commit a797c91
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/SimpleReplay/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,14 +397,12 @@ def save_query_stats(self, starttime, endtime, xid, query_idx):
)

def get_tagged_sql(self, query_text, idx, transaction, connection):
if g_config.get("source_tag", None):
json_tags = {
"xid": transaction.xid,
"query_idx": idx,
"replay_start": g_replay_timestamp.isoformat(),
"source": g_config.get('source_tag', 'SimpleReplay'),
}

json_tags = {
"xid": transaction.xid,
"query_idx": idx,
"replay_start": g_replay_timestamp.isoformat(),
"source": g_config.get('source_tag', 'SimpleReplay'),
}

return "/* {} */ {}".format(json.dumps(json_tags), query_text)

Expand Down

0 comments on commit a797c91

Please sign in to comment.