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

Model.find() does not expose metrics for profiling #794

Open
aschneidz opened this issue Nov 24, 2024 · 2 comments
Open

Model.find() does not expose metrics for profiling #794

aschneidz opened this issue Nov 24, 2024 · 2 comments

Comments

@aschneidz
Copy link

The response of a model.find() object does not include the metrics object which can be found in the native nodeJS SDK, instead it comes through as undefined.

  meta: QueryMetaData {
    requestId: '31e63cf5-39a7-4032-930e-73e9be15789a',
    clientContextId: 'f29f81-a12a-7340-5d43-67850195bcbc34',
    status: 'success',
    signature: {
      _type: 'json',
      email: 'json',
      firstName: 'json',
      id: 'json',
      lastName: 'json',
      num: 'json'
    },
    warnings: [],
    metrics: undefined,
    profile: undefined
  }
}

Attempting to set the options flag from the NodeJS SDJK like so, also does not work:
result = await Test.find({ firstName: 'Major' }, { metrics: true });

Can this please be exposed in Ottoman so we can monitor query performance during development?

@aschneidz
Copy link
Author

@ejscribner FYI

@aschneidz
Copy link
Author

To solve this, Ottoman will need to handle the queryOptions for .find() and other query based methods

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

1 participant