Skip to content

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

@aaron-schneider-cb

Description

@aaron-schneider-cb

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions