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

feat(config): js catcher options support #3

Merged
merged 9 commits into from
Oct 13, 2024
Merged

feat(config): js catcher options support #3

merged 9 commits into from
Oct 13, 2024

Conversation

neSpecc
Copy link
Member

@neSpecc neSpecc commented Oct 11, 2024

You can pass user, context, beforeSend and other JS Catcher options via catcherOptions config property.

export default defineNuxtConfig({
  modules: [
    '@hawk.so/nuxt'
  ],

  hawk: {
    token: process.env.HAWK_TOKEN,
    catcherOptions: {
      context: {
        // any data you want to send with all events
        appName: 'Hawk Nuxt Playgorund',
      },
      // method for filtering/modifying an event to be sent
      beforeSend: (event) => {
        event.context.appVersion = '1.0.0'

        return event
      },
    },
  },
})

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
playground/nuxt.config.ts Outdated Show resolved Hide resolved
neSpecc and others added 3 commits October 11, 2024 19:01
@neSpecc neSpecc merged commit c438fcf into main Oct 13, 2024
2 checks passed
@neSpecc neSpecc deleted the catcher-options branch October 13, 2024 19:52
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

Successfully merging this pull request may close these issues.

3 participants