Support filtering by elasticsearch spans
aspectom opened this issue · 0 comments
aspectom commented
Currently, we allow to filter by specific databases/orm like mongo/sequelize.
We want to enable this same behavior on elasticsearch, so users could filter by elasticsearch spans easily.
This is an example of usage in sequelize
const sequelizeActivities = spans.sequelize();
expect(sequelizeActivities.length).toBe(1);
expect(sequelizeActivities.first.dbOperation).toBe("SELECT");
expect(Array.isArray(JSON.parse(sequelizeActivities.first.dbResponse))).toBe(true);
We would want to enable something like this:
const esSpans = spans.elasticsearch();
expect(esSpans.length).toBe(1);
It means to implement this filter in SpansRepository class. See how it's implemented for mongo/sequelize etc.