-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Using prometheus_ecto version 1.3.0, I observe the following stack trace:
** (ArgumentError) argument error
(stdlib) :ets.lookup(:prometheus_histogram_table, {:default, :ecto_db_query_duration_microseconds, [:ok], 3})
src/metrics/prometheus_histogram.erl:196: :prometheus_histogram.observe/4
lib/core/repo_instrumenter.ex:5: Core.RepoInstrumenter.log/1
lib/core/repo.ex:2: Core.Repo.__log__/1
(db_connection) lib/db_connection.ex:1186: DBConnection.log/6
(ecto) lib/ecto/adapters/postgres/connection.ex:73: Ecto.Adapters.Postgres.Connection.prepare_execute/5
(ecto) lib/ecto/adapters/sql.ex:256: Ecto.Adapters.SQL.sql_call/6
(ecto) lib/ecto/adapters/sql.ex:426: Ecto.Adapters.SQL.execute_and_cache/7
The Core.RepoInstrumenter module refers to my instrumenter (MyApp.Repo.Instrumenter in the README).
The migration starts by dropping all the rows in a table using Ecto.Repo.delete_all/1. Something like:
MyRepo.delete_all(MySchema)I can work-around the error by using Ecto.Migration.drop/1 and Ecto.Migration.create/1 in place of delete_all/1:
drop table(:my_table_name)
create table(:my_table_name, primary_key: false) do
add :foo, :string, null: false
add :bar, :string, null: false
# ...
endReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels