> For the complete documentation index, see [llms.txt](https://stephen-tsoi.gitbook.io/stephen-tsoi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stephen-tsoi.gitbook.io/stephen-tsoi-docs/event-driven-architecture/event-governance-the-foundation-of-successful-event-driven-architecture/day-11-14-event-audit.md).

# Day 11/14 Event Audit

Day 11 of 14: Implement robust Event Audit frameworks using platform logs and automated agents to catch non-compliant application behaviors and runtime topic discrepancies.

In Event-driven architecture (EDA), conducting an Event audit is crucial to ensure the alignment of implementation with design standards and guidelines. This process aids in uncovering any overlooked non-compliant items or bugs that may have arisen during architecture, development, and testing phases.

**Platform Event Log** The platform event log records various activities associated with the event bus, such as establishing connections, publishing events, subscribing to messages, and disconnecting. These logs, stored on the event mesh, offer valuable insights for troubleshooting and audit checks. By leveraging business intelligence (BI) tools or log analysis tools, one can scrutinize application behavior and pinpoint non-compliant elements. Some common errors identifiable through event log analysis include:

* Utilizing end-of-life operating systems, frameworks, or APIs
* Making REST-style calls (non-persistent connection) instead of adhering to the specified event-driven approach
* Neglecting to invoke the unbind API when disconnecting from the event bus
* Experiencing frequent reconnections to the event mesh, potentially impacting performance
* Inadequate processing power for handling high-volume transactions
* Employing expired tokens due to programming errors

**Event Topic in Production** Event topics are pivotal in routing events to appropriate subscribers within Event-driven architecture. Organizations typically configure event mesh and define event topic names through continuous integration and continuous deployment (CICD) processes. However, discrepancies may arise between the configured topic names and the actual implementation in the application's configuration file, leading to production incidents. To detect such issues, an agent can monitor all topics in both testing (SAT) and production environments. The agent compares observed topic names with the original design to flag any deviations. Common issues identified through this process include:

* Using wildcards in publish topics, potentially causing unintended message omissions
* Diverging from the original design in the wording or structure of topic names
* Adding unnecessary levels to the topic hierarchy, complicating event routing.

## 🚀 Let's Connect Beyond GitBook!

If you found this article helpful, you can find more of my technical insights, daily discussions, and deep dives across these platforms:

* **Read more of my work:** Check out my articles on [dev.to](https://dev.to/stephen_tsoi_5b2c4055f3a9) and [Hashnode](https://stephentsoi.hashnode.dev/).
* **Join the daily conversation:** Connect with me directly on [LinkedIn](https://www.linkedin.com/in/stephen-tsoi-16309730/).

***

#### 📬 Stay Ahead of the Curve

Enjoyed this piece? I break down complex technical topics into bite-sized, actionable insights every week.

👉 **Subscribe to my** [**LinkedIn Newsletter**](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7487299517642612736) to never miss an update and get the latest articles delivered straight to your feed!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://stephen-tsoi.gitbook.io/stephen-tsoi-docs/event-driven-architecture/event-governance-the-foundation-of-successful-event-driven-architecture/day-11-14-event-audit.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
