Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SST Console issues subscription pattern doesn't match errors #26

Open
semiautomatix opened this issue Oct 28, 2024 · 2 comments
Open

SST Console issues subscription pattern doesn't match errors #26

semiautomatix opened this issue Oct 28, 2024 · 2 comments

Comments

@semiautomatix
Copy link

We're using Powertools Logger and after some digging realised that the pattern provided by SST Console ?"Invoke Error" ?"Error: Runtime exited" ?"Task timed out after" ?" ERROR " ?"[ERROR]" does not match any part of the errors in the logs.

We will now be interception and formatting each log before passing on to the console, to adhere to this pattern. However, I might suggest a change to the subscription pattern that we be allowed to add custom filtering to the pattern in the sst.config.ts file.

filterPattern: [
`?"Invoke Error"`,
// OOM and other runtime error
`?"Error: Runtime exited"`,
// Timeout
`?"Task timed out after"`,
// NodeJS Uncaught and console.error
`?"\tERROR\t"`,
`?"[ERROR]"`,
// ...(fn.enrichment.runtime?.startsWith("nodejs")
// ? [`?"\tERROR\t"`]
// : []),
].join(" "),

filterPattern: [
  `?"Invoke Error"`,
  // OOM and other runtime error
  `?"Error: Runtime exited"`,
  // Timeout
  `?"Task timed out after"`,
  // NodeJS Uncaught and console.error
  `?"\tERROR\t"`,
  `?"[ERROR]"`,
  // ...(fn.enrichment.runtime?.startsWith("nodejs")
  //   ? [`?"\tERROR\t"`]
  //   : []),
  sstConfig.console?.customerFilterPattern ?? ""
].join(" "),
@semiautomatix semiautomatix changed the title SST Console issues subscription pattern doesn't matter errors SST Console issues subscription pattern doesn't match errors Oct 28, 2024
@semiautomatix
Copy link
Author

After some investigation it seems it's not possible to process the Powertools logs using SST Console.

@jayair
Copy link
Contributor

jayair commented Nov 1, 2024

Yeah we don't support this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants