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

Document use of special parameterized object for captureError #159

Closed
watson opened this issue Jan 8, 2018 · 0 comments
Closed

Document use of special parameterized object for captureError #159

watson opened this issue Jan 8, 2018 · 0 comments
Assignees
Labels
Projects

Comments

@watson
Copy link
Contributor

watson commented Jan 8, 2018

The captureError function can take 3 types of arguments in the first position:

  • An error object
  • A string
  • A special type of parameterized object

The latter is currently undocumented.

If captureError is passed an object instead of an error or a string we expect it to be in the format of { message: '...', params: [] }.

Example usage:

agent.captureError({
  message: 'Could not find user %s with id %d in the database',
  params: ['Peter', 42]
})

This makes it possible for us to better group error messages that contain variable data like ID's or names.

@watson watson added the docs label Jan 8, 2018
@watson watson added this to Scheduled in Schedule Jan 9, 2018
@watson watson self-assigned this Jan 14, 2018
watson added a commit to watson/apm-agent-nodejs that referenced this issue Jan 14, 2018
@watson watson moved this from Scheduled to Review in Schedule Jan 14, 2018
Schedule automation moved this from Review to Done Jan 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

1 participant