Skip to content

Commit

Permalink
Add missing db providers to db.system (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrblonde91 committed Mar 2, 2023
1 parent 16d8891 commit fd72cac
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Released 2023-Jan-25
* Added support to `EnrichWithIDbCommand`
([#868](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/868))

* Map missing dbs to db.system:
`OpenTelemetry.Instrumentation.EntityFrameworkCore`
[#898](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/898)

## 1.0.0-beta.3

Released 2022-Mar-18
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,47 @@ public override void OnCustom(string name, Activity activity, object payload)
activity.AddTag(AttributeDbSystem, "cosmosdb");
break;
case "Microsoft.EntityFrameworkCore.Sqlite":
case "Devart.Data.SQLite.EFCore":
activity.AddTag(AttributeDbSystem, "sqlite");
break;
case "MySql.Data.EntityFrameworkCore":
case "Pomelo.EntityFrameworkCore.MySql":
case "Devart.Data.MySql.EFCore":
activity.AddTag(AttributeDbSystem, "mysql");
break;
case "Npgsql.EntityFrameworkCore.PostgreSQL":
case "Devart.Data.PostgreSql.EFCore":
activity.AddTag(AttributeDbSystem, "postgresql");
break;
case "Oracle.EntityFrameworkCore":
case "Devart.Data.Oracle.EFCore":
activity.AddTag(AttributeDbSystem, "oracle");
break;
case "Microsoft.EntityFrameworkCore.InMemory":
activity.AddTag(AttributeDbSystem, "efcoreinmemory");
break;
case "FirebirdSql.EntityFrameworkCore.Firebird":
activity.AddTag(AttributeDbSystem, "firebird");
break;
case "FileContextCore":
activity.AddTag(AttributeDbSystem, "filecontextcore");
break;
case "EntityFrameworkCore.SqlServerCompact35":
case "EntityFrameworkCore.SqlServerCompact40":
activity.AddTag(AttributeDbSystem, "mssqlcompact");
break;
case "EntityFrameworkCore.OpenEdge":
activity.AddTag(AttributeDbSystem, "openedge");
break;
case "EntityFrameworkCore.Jet":
activity.AddTag(AttributeDbSystem, "jet");
break;
case "Google.Cloud.EntityFrameworkCore.Spanner":
activity.AddTag(AttributeDbSystem, "spanner");
break;
case "Teradata.EntityFrameworkCore":
activity.AddTag(AttributeDbSystem, "teradata");
break;
default:
activity.AddTag(AttributeDbSystem, "other_sql");
activity.AddTag("ef.provider", providerName);
Expand Down

0 comments on commit fd72cac

Please sign in to comment.