-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
W-11859214: A.8.2 Respect semantic conventions of span generation in …
…DB connector
- Loading branch information
Showing
19 changed files
with
473 additions
and
26 deletions.
There are no files selected for viewing
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
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
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
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
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
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
51 changes: 51 additions & 0 deletions
51
...rg/mule/extension/db/internal/domain/connection/mysql/MySqlConnectionTracingMetadata.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,51 @@ | ||
/* | ||
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com | ||
* The software in this package is published under the terms of the CPAL v1.0 | ||
* license, a copy of which has been included with this distribution in the | ||
* LICENSE.txt file. | ||
*/ | ||
package org.mule.extension.db.internal.domain.connection.mysql; | ||
|
||
import org.mule.db.commons.internal.domain.connection.DbConnectionTracingMetadata; | ||
|
||
import static org.mule.db.commons.internal.domain.connection.ConnectionTracingMetadataUtils.getPeerNameFrom; | ||
import static org.mule.db.commons.internal.domain.connection.ConnectionTracingMetadataUtils.getPeerTransportFrom; | ||
|
||
import static java.util.Optional.ofNullable; | ||
|
||
import java.util.Optional; | ||
|
||
public class MySqlConnectionTracingMetadata implements DbConnectionTracingMetadata { | ||
|
||
public static final String MYSQL = "mysql"; | ||
private final MySqlConnectionParameters mySqlParameter; | ||
|
||
public MySqlConnectionTracingMetadata(MySqlConnectionParameters mySqlParameters) { | ||
this.mySqlParameter = mySqlParameters; | ||
} | ||
|
||
@Override | ||
public String getDbSystem() { | ||
return MYSQL; | ||
} | ||
|
||
@Override | ||
public String getConnectionString() { | ||
return mySqlParameter.getUrl(); | ||
} | ||
|
||
@Override | ||
public String getUser() { | ||
return mySqlParameter.getUser(); | ||
} | ||
|
||
@Override | ||
public Optional<String> getPeerName() { | ||
return ofNullable(getPeerNameFrom(mySqlParameter.getUrl())); | ||
} | ||
|
||
@Override | ||
public Optional<String> getPeerTransport() { | ||
return ofNullable(getPeerTransportFrom(mySqlParameter.getUrl())); | ||
} | ||
} |
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
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
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
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
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
Oops, something went wrong.