public interface SqlTracer extends SqlTracerExplainInfo, Tracer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATABASE_VENDOR_PARAMETER_NAME |
static java.lang.String |
EXPLAIN_PLAN_FORMAT_PARAMETER_NAME |
static java.lang.String |
EXPLAIN_PLAN_PARAMETER_NAME |
static java.lang.String |
SQL_OBFUSCATED_PARAMETER_NAME |
static java.lang.String |
SQL_PARAMETER_NAME |
Modifier and Type | Method and Description |
---|---|
com.newrelic.agent.bridge.datastore.ConnectionFactory |
getConnectionFactory()
Returns a ConnectionFactory instance which can create a database connection on demand.
|
java.lang.String |
getHost()
Returns the host of database instance used to run the query.
|
java.lang.Object[] |
getParams()
Returns an Object array containing the parameters (in order) that were set on a PreparedStatement.
|
java.lang.Integer |
getPort()
Returns the port of database instance used to run the query.
|
java.lang.String |
getRawSql()
Returns the raw sql string that was used for a given query.
|
Transaction |
getTransaction()
Return the Transaction that this SqlTracer is participating in.
|
void |
provideConnection(java.sql.Connection conn)
Grab the host and port from the connection and store it on this tracer.
|
void |
setConnectionFactory(com.newrelic.agent.bridge.datastore.ConnectionFactory connectionFactory)
Store a connection factory instance on this SqlTracer for later use.
|
void |
setParams(java.lang.Object[] params)
Store the parameters for this sql statement (must be in order).
|
void |
setRawSql(java.lang.String rawSql)
Store the raw sql string on this tracer.
|
getExplainPlanExecutor, getSql, hasExplainPlan, setExplainPlan
childTracerFinished, getAgentAttribute, getAgentAttributes, getChildCount, getClassMethodSignature, getCustomAttributes, getEndTime, getEndTimeInMilliseconds, getExclusiveDuration, getExternalParameters, getGuid, getMetricName, getParentTracer, getRunningDurationInNanos, getStartTime, getStartTimeInMillis, getStartTimeInMilliseconds, getTransactionActivity, getTransactionSegment, getTransactionSegmentName, getTransactionSegmentUri, isAsync, isChildHasStackTrace, isLeaf, isParent, isTransactionSegment, markFinishTime, removeAgentAttribute, removeTransactionSegment, setAgentAttribute, setParentTracer
getDuration, getDurationInMilliseconds
addExclusiveRollupMetricName, addOutboundRequestHeaders, getParentTracedMethod, isMetricProducer, isTrackCallbackRunnable, nameTransaction, readInboundResponseHeaders, reportAsExternal, setCustomMetricPrefix, setMetricNameFormatInfo, setRollupMetricNames, setTrackCallbackRunnable, setTrackChildThreads, trackChildThreads
addRollupMetricName, reportAsExternal, setMetricName
addCustomAttribute, addCustomAttribute, addCustomAttribute, addCustomAttributes
getException, setNoticedError, setThrownException, wasExceptionSetByAPI
static final java.lang.String EXPLAIN_PLAN_PARAMETER_NAME
static final java.lang.String EXPLAIN_PLAN_FORMAT_PARAMETER_NAME
static final java.lang.String DATABASE_VENDOR_PARAMETER_NAME
static final java.lang.String SQL_PARAMETER_NAME
static final java.lang.String SQL_OBFUSCATED_PARAMETER_NAME
com.newrelic.agent.bridge.datastore.ConnectionFactory getConnectionFactory()
void setConnectionFactory(com.newrelic.agent.bridge.datastore.ConnectionFactory connectionFactory)
NoticeSqlVisitor
connectionFactory
- The ConnectionFactory instance to storejava.lang.String getRawSql()
void provideConnection(java.sql.Connection conn)
conn
- the connection instance to grab fromvoid setRawSql(java.lang.String rawSql)
NoticeSqlVisitor
rawSql
- the raw sql string to storejava.lang.Object[] getParams()
void setParams(java.lang.Object[] params)
NoticeSqlVisitor
params
- the parameters of this sql statementTransaction getTransaction()
java.lang.String getHost()
java.lang.Integer getPort()