You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to instrument db queries via the Sequelize model executed so that it can give an idea which queries are slow.
As of now I see a generic instrumentation implementation for a datastore and also a all in one example of sequelize which is equivalent to a web transaction metrics
Feature Description
It would be really helpful if theres a pluggable implementation to instrument sequelize models as per the query time being taken and it would be great if its pluggable on the model level instead of instrumenting on query execution level .
Describe Alternatives
As of now I dont have a real example to show . But just to demonstrate
static associate(models) {
this.belongsTo(models.Asset, {
foreignKey: 'assetId', // 'assetId' is a column in 'Post' referencing 'id' in 'Asset'
as: 'asset', // Optional: Specifies an alias for when you load the association
});
this.hasMany(models.Comment, {
foreignKey: 'postId',
as: 'comments',
});
}
}
Post.instrument(shim){
// add instrumentation
}`
Additional context
Add any other context here.
Priority
Please help us better understand this feature request by choosing a priority from the following options:
Really want to track during load testing
The text was updated successfully, but these errors were encountered:
workato-integrationbot
changed the title
Add easier and generic instrumentation on Sequelize models
Add easier and generic instrumentation on Sequelize models
Sep 25, 2024
Is your feature request related to a problem? Please describe.
I want to instrument db queries via the Sequelize model executed so that it can give an idea which queries are slow.
As of now I see a generic instrumentation implementation for a datastore and also a all in one example of sequelize which is equivalent to a web transaction metrics
Feature Description
It would be really helpful if theres a pluggable implementation to instrument sequelize models as per the query time being taken and it would be great if its pluggable on the model level instead of instrumenting on query execution level .
Describe Alternatives
As of now I dont have a real example to show . But just to demonstrate
`class Post extends Model {
static init(sequelize) {
super.init(
{
userId:DataTypes.INTEGER,
assetId:DataTypes.INTEGER
},
{
sequelize,
timestamps: true,
underscored: false,
createdAt: "createdAt",
updatedAt: "updatedAt",
tableName: "posts",
}
);
}
}
Post.instrument(shim){
// add instrumentation
}`
Additional context
Add any other context here.
Priority
Please help us better understand this feature request by choosing a priority from the following options:
Really want to track during load testing
The text was updated successfully, but these errors were encountered: