-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
14,693 additions
and
963 deletions.
There are no files selected for viewing
133 changes: 133 additions & 0 deletions
133
...ootstrap/src/main/java/io/opentelemetry/auto/typedspan/DbCassandraSemanticConvention.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.opentelemetry.auto.typedspan; | ||
|
||
import io.opentelemetry.trace.Span; | ||
|
||
public interface DbCassandraSemanticConvention { | ||
void end(); | ||
|
||
Span getSpan(); | ||
|
||
/** | ||
* Sets a value for db.system | ||
* | ||
* @param dbSystem An identifier for the database management system (DBMS) product being used. See | ||
* below for a list of well-known identifiers.. | ||
*/ | ||
public DbCassandraSemanticConvention setDbSystem(String dbSystem); | ||
|
||
/** | ||
* Sets a value for db.connection_string | ||
* | ||
* @param dbConnectionString The connection string used to connect to the database.. | ||
* <p>It is recommended to remove embedded credentials. | ||
*/ | ||
public DbCassandraSemanticConvention setDbConnectionString(String dbConnectionString); | ||
|
||
/** | ||
* Sets a value for db.user | ||
* | ||
* @param dbUser Username for accessing the database.. | ||
*/ | ||
public DbCassandraSemanticConvention setDbUser(String dbUser); | ||
|
||
/** | ||
* Sets a value for db.mssql.instance_name | ||
* | ||
* @param dbMssqlInstanceName The Microsoft SQL Server [instance | ||
* name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) | ||
* connecting to. This name is used to determine the port of a named instance.. | ||
* <p>If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still | ||
* recommended if non-standard). | ||
*/ | ||
public DbCassandraSemanticConvention setDbMssqlInstanceName(String dbMssqlInstanceName); | ||
|
||
/** | ||
* Sets a value for db.jdbc.driver_classname | ||
* | ||
* @param dbJdbcDriverClassname The fully-qualified class name of the JDBC driver used to | ||
* connect.. | ||
*/ | ||
public DbCassandraSemanticConvention setDbJdbcDriverClassname(String dbJdbcDriverClassname); | ||
|
||
/** | ||
* Sets a value for db.name | ||
* | ||
* @param dbName If no tech-specific attribute is defined, this attribute is used to report the | ||
* name of the database being accessed. For commands that switch the database, this should be | ||
* set to the target database (even if the command fails).. | ||
* <p>In some SQL databases, the database name to be used is called "schema name". | ||
*/ | ||
public DbCassandraSemanticConvention setDbName(String dbName); | ||
|
||
/** | ||
* Sets a value for db.statement | ||
* | ||
* @param dbStatement The database statement being executed.. | ||
* <p>The value may be sanitized to exclude sensitive information. | ||
*/ | ||
public DbCassandraSemanticConvention setDbStatement(String dbStatement); | ||
|
||
/** | ||
* Sets a value for db.operation | ||
* | ||
* @param dbOperation The name of the operation being executed, e.g. the [MongoDB command | ||
* name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as | ||
* `findAndModify`.. | ||
* <p>While it would semantically make sense to set this, e.g., to a SQL keyword like `SELECT` | ||
* or `INSERT`, it is not recommended to attempt any client-side parsing of `db.statement` | ||
* just to get this property (the back end can do that if required). | ||
*/ | ||
public DbCassandraSemanticConvention setDbOperation(String dbOperation); | ||
|
||
/** | ||
* Sets a value for net.peer.name | ||
* | ||
* @param netPeerName Remote hostname or similar, see note below.. | ||
*/ | ||
public DbCassandraSemanticConvention setNetPeerName(String netPeerName); | ||
|
||
/** | ||
* Sets a value for net.peer.ip | ||
* | ||
* @param netPeerIp Remote address of the peer (dotted decimal for IPv4 or | ||
* [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). | ||
*/ | ||
public DbCassandraSemanticConvention setNetPeerIp(String netPeerIp); | ||
|
||
/** | ||
* Sets a value for net.peer.port | ||
* | ||
* @param netPeerPort Remote port number.. | ||
*/ | ||
public DbCassandraSemanticConvention setNetPeerPort(long netPeerPort); | ||
|
||
/** | ||
* Sets a value for net.transport | ||
* | ||
* @param netTransport Transport protocol used. See note below.. | ||
*/ | ||
public DbCassandraSemanticConvention setNetTransport(String netTransport); | ||
|
||
/** | ||
* Sets a value for db.cassandra.keyspace | ||
* | ||
* @param dbCassandraKeyspace The name of the keyspace being accessed. To be used instead of the | ||
* generic `db.name` attribute.. | ||
*/ | ||
public DbCassandraSemanticConvention setDbCassandraKeyspace(String dbCassandraKeyspace); | ||
} |
Oops, something went wrong.