| Modifier and Type | Field and Description |
|---|---|
static String |
IGNORE_FOR_TRACING_REGEX |
protected static Pattern |
PATTERN_FOR_IGNORING |
protected static String |
TRACE_WITH_ACTIVE_SPAN_ONLY |
protected io.opentracing.Tracer |
tracer |
protected static String |
WITH_ACTIVE_SPAN_ONLY |
| Constructor and Description |
|---|
TracingDriver() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsURL(String url) |
Connection |
connect(String url,
Properties info) |
protected Set<String> |
extractIgnoredStatements(String url) |
protected String |
extractRealUrl(String url) |
protected Driver |
findDriver(String realUrl) |
int |
getMajorVersion() |
int |
getMinorVersion() |
Logger |
getParentLogger() |
DriverPropertyInfo[] |
getPropertyInfo(String url,
Properties info) |
protected String |
getUrlPrefix() |
boolean |
jdbcCompliant() |
static Driver |
load()
Load the
TracingDriver into the DriverManager.This method has the following behavior: Deregister all previously registered drivers. Load TracingDriver as the first driver.
Reregister all drivers that were just deregistered.
|
static void |
setInterceptorMode(boolean interceptorMode)
Turns "interceptor mode" on or off.
|
static void |
setInterceptorProperty(boolean withActiveSpanOnly)
Sets the
withActiveSpanOnly property for "interceptor mode". |
static void |
setInterceptorProperty(Set<String> ignoreStatements)
Sets the
ignoreStatements property for "interceptor mode". |
void |
setTracer(io.opentracing.Tracer tracer) |
protected static final String TRACE_WITH_ACTIVE_SPAN_ONLY
protected static final String WITH_ACTIVE_SPAN_ONLY
public static final String IGNORE_FOR_TRACING_REGEX
protected static final Pattern PATTERN_FOR_IGNORING
protected io.opentracing.Tracer tracer
public static Driver load()
TracingDriver into the DriverManager.TracingDriver as the first driver.TracingDriver.public static void setInterceptorMode(boolean interceptorMode)
interceptorMode - The interceptorMode value.public static void setInterceptorProperty(boolean withActiveSpanOnly)
withActiveSpanOnly property for "interceptor mode".withActiveSpanOnly - The withActiveSpanOnly value.public static void setInterceptorProperty(Set<String> ignoreStatements)
ignoreStatements property for "interceptor mode".ignoreStatements - The ignoreStatements value.public Connection connect(String url, Properties info) throws SQLException
connect in interface DriverSQLExceptionpublic boolean acceptsURL(String url) throws SQLException
acceptsURL in interface DriverSQLExceptionpublic DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
getPropertyInfo in interface DriverSQLExceptionpublic int getMajorVersion()
getMajorVersion in interface Driverpublic int getMinorVersion()
getMinorVersion in interface Driverpublic boolean jdbcCompliant()
jdbcCompliant in interface Driverpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface DriverSQLFeatureNotSupportedExceptionpublic void setTracer(io.opentracing.Tracer tracer)
protected String getUrlPrefix()
protected Driver findDriver(String realUrl) throws SQLException
SQLExceptionCopyright © 2017-2020–2020. All rights reserved.