π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
Update copilot-instructions.md
Enno Gelhausfdddf2ca2634
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.mdindex 220e7bd7a..fbd902646 100644--- a/.github/copilot-instructions.md+++ b/.github/copilot-instructions.md@@ -49,5 +49,68 @@---+# Logs++- Where logs are used, ensure Sentry is imported using `import * as Sentry from "@sentry/nextjs"`+- Enable logging in Sentry using `Sentry.init({ enableLogs: true })`+- Reference the logger using `const { logger } = Sentry`+- Sentry offers a `consoleLoggingIntegration` that can be used to log specific console error types automatically without instrumenting the individual logger calls++## Configuration++The Sentry initialization needs to be updated to enable the logs feature.++### Baseline++```javascript+import * as Sentry from "@sentry/nextjs";++Sentry.init({+ dsn: "https://[email protected]/0",++ enableLogs: true,+});+```++### Logger Integration++```javascript+Sentry.init({+ dsn: "https://[email protected]/0",+ integrations: [+ // send console.log, console.error, and console.warn calls as logs to Sentry+ Sentry.consoleLoggingIntegration({ levels: ["log", "error", "warn"] }),+ ],+});+```++## Logger Examples++`logger.fmt` is a template literal function that should be used to bring variables into the structured logs.++```javascript+import * as Sentry from "@sentry/nextjs";++const { logger } = Sentry;++logger.trace("Starting database connection", { database: "users" });+logger.debug(logger.fmt`Cache miss for user: ${userId}`);+logger.info("Updated profile", { profileId: 345 });+logger.warn("Rate limit reached for endpoint", {+ endpoint: "/api/results/",+ isEnterprise: false,+});+logger.error("Failed to process payment", {+ orderId: "order_123",+ amount: 99.99,+});+logger.fatal("Database connection pool exhausted", {+ database: "users",+ activeConnections: 100,+});+```++---+For questions or unclear conventions, check the main README or ask for clarification in your PR description.