-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed:Incorrect component name when using Pomelo.EntityFrameworkCore.…
…MySlq (#428) * Update version.props (#424) * fix(SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql):added support for new version EntityFrameworkCore.Pomelo.MySql fix(SkyApm.Diagnostics.EntityFrameworkCore):Fixed an issue that the component name of EntityFrameworkCore could not be obtained correctly in SkyWalking-UI Co-authored-by: 郭刚平 <[email protected]> Co-authored-by: 延鹏 王 <[email protected]>
- Loading branch information
1 parent
3a9ab3b
commit 770e0b5
Showing
7 changed files
with
34 additions
and
7 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
23 changes: 23 additions & 0 deletions
23
...SkyApm.Diagnostics.EntityFrameworkCore.Pomelo.MySql/MySqlConnectorSpanMetadataProvider.cs
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,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Data.Common; | ||
using System.Text; | ||
using SkyApm.Common; | ||
|
||
namespace SkyApm.Diagnostics.EntityFrameworkCore | ||
{ | ||
public class MySqlConnectorSpanMetadataProvider : IEntityFrameworkCoreSpanMetadataProvider | ||
{ | ||
public StringOrIntValue Component { get; } = Components.POMELO_ENTITYFRAMEWORKCORE_MYSQL; | ||
|
||
public bool Match(DbConnection connection) | ||
{ | ||
return connection.GetType().FullName == "MySqlConnector.MySqlConnection"; | ||
} | ||
|
||
public string GetPeer(DbConnection connection) | ||
{ | ||
return connection.DataSource; | ||
} | ||
} | ||
} |
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