Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

feat: include tenant_url in event attributes for logging (#7582)

Vishal Sharma8d7d33393d49
diff --git a/frontend/src/api/common/logEvent.ts b/frontend/src/api/common/logEvent.ts
index 26c7807bd9..fd09002582 100644
--- a/frontend/src/api/common/logEvent.ts
+++ b/frontend/src/api/common/logEvent.ts
@@ -11,9 +11,12 @@ const logEvent = async (
rateLimited?: boolean,
): Promise<SuccessResponse<EventSuccessPayloadProps> | ErrorResponse> => {
try {
+ // add tenant_url to attributes
+ const { hostname } = window.location;
+ const updatedAttributes = { ...attributes, tenant_url: hostname };
const response = await axios.post('/event', {
eventName,
- attributes,
+ attributes: updatedAttributes,
eventType: eventType || 'track',
rateLimited: rateLimited || false, // TODO: Update this once we have a proper way to handle rate limiting
});