Skip to content

Commit

Permalink
Map Trilogy -> MySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahramadan committed Nov 20, 2024
1 parent 448f085 commit 82d46c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/new_relic/agent/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ def append_sql(new_sql)
MYSQL_PREFIX = 'mysql'.freeze
MYSQL2_PREFIX = 'mysql2'.freeze
SQLITE_PREFIX = 'sqlite'.freeze
TRILOGY_PREFIX = 'trilogy'.freeze

def symbolized_adapter(adapter)
if adapter.start_with?(POSTGRES_PREFIX) || adapter == POSTGIS_PREFIX
Expand All @@ -289,6 +290,8 @@ def symbolized_adapter(adapter)
:mysql2
elsif adapter.start_with?(SQLITE_PREFIX)
:sqlite
elsif adapter == TRILOGY_PREFIX
:trilogy
else
adapter.to_sym
end
Expand Down
3 changes: 3 additions & 0 deletions lib/new_relic/agent/instrumentation/active_record_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ def map_operation(raw_operation)

'sqlite3' => 'SQLite',

# https://rubygems.org/gems/trilogy
'trilogy' => 'MySQL',

# https://rubygems.org/gems/activerecord-jdbcpostgresql-adapter
'jdbcmysql' => 'MySQL',

Expand Down

0 comments on commit 82d46c6

Please sign in to comment.