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
defrecord(transaction)payload=transaction.payloadpool,conn=get_pool_n_conn(payload[:connection_id])returnifIGNORE_OPS.include?(payload[:name]) || pool.nil? || conn.nil?# The spec notation is Rails < 6.1, later this can be found in the db_configdb_config=ifpool.respond_to?(:spec)pool.spec.configelsepool.db_config.configuration_hashendname,sql=build_name_sql_metaconfig: db_config,conn: connsubsegment=XRay.recorder.begin_subsegmentname,namespace: 'remote'# subsegment is nil in case of context missingreturnifsubsegment.nil?subsegment.start_time=transaction.time.to_fsubsegment.sql=sqlXRay.recorder.end_subsegmentend_time: transaction.end.to_fend
I would like to add sql[:sanitized_query] = payload[:sql] to the above code as follows.
defrecord(transaction)payload=transaction.payloadpool,conn=get_pool_n_conn(payload[:connection_id])returnifIGNORE_OPS.include?(payload[:name]) || pool.nil? || conn.nil?# The spec notation is Rails < 6.1, later this can be found in the db_configdb_config=ifpool.respond_to?(:spec)pool.spec.configelsepool.db_config.configuration_hashendname,sql=build_name_sql_metaconfig: db_config,conn: connsql[:sanitized_query]=payload[:sql]subsegment=XRay.recorder.begin_subsegmentname,namespace: 'remote'# subsegment is nil in case of context missingreturnifsubsegment.nil?subsegment.start_time=transaction.time.to_fsubsegment.sql=sqlXRay.recorder.end_subsegmentend_time: transaction.end.to_fend
If it is too difficult, put SQL in the metadata.
The text was updated successfully, but these errors were encountered:
The following pull-link said the feature would be implemented, but it doesn't seem to be supported yet.
#21
Would you be willing to merge the code similar to the pull request author's suggestion?
The part I want to fix is the following record method.
https://github.com/aws/aws-xray-sdk-ruby/blob/5d482e76d86b7610d5fe8e404c44cd0bce9e9547/lib/aws-xray-sdk/facets/rails/active_record.rb
I would like to add sql[:sanitized_query] = payload[:sql] to the above code as follows.
If it is too difficult, put SQL in the metadata.
The text was updated successfully, but these errors were encountered: