Somehow Instream.Connection is not picking the defined config in dev environment?

I have defined a InfluxConnection module

defmodule MyModule.InfluxConnection do
  use Instream.Connection, otp_app: :my_app

  def safe_query(query, opts \\ [log: false]) ...
  def safe_write(data, opts \\ [log: false]) ...
end

and the config is

config :my_app, MyModule.InfluxConnection,
  auth: ....
  database: System.get_env("INFLUXDB_DB") || "price_service",
  host: System.get_env("INFLUX_HOSTNAME") || "localhost",
  pool: [max_overflow: 10, size: 50],
  port: 8086,
  scheme: "http",
  writer: Instream.Writer.Line

after running the following two function in dev environment i am getting two different result

iex(7)> Application.get_env(:my_app, MyModule.InfluxConnection)
[
  auth: [method: :basic, username: "local_user", password: ""],
  database: "price_service",
  host: "influxdb",
  pool: [max_overflow: 10, size: 50],
  port: 8086,
  scheme: "http",
  writer: Instream.Writer.Line
]
iex(8)> Instream.Connection.Config.runtime(:my_app, MyModule.InfluxConnection, nil)
[
  host: "localhost",
  loggers: [{Instream.Log.DefaultLogger, :log, []}],
  port: 8086,
  scheme: "http",
  writer: Instream.Writer.Line
]

but the result of these two function should be same, I think somehow my Instream.Connection is not picking the defined config in dev.exs

help me out, please i am stuck here.
what could be possible error, i am running influxdb in docker.

The output of runtime matches the “global defaults”:

which sounds like your config is being used at all :thinking:

FWIW: I didn’t see anything in the commit history that seemed related to this specific issue, but Config.runtime was renamed almost two years ago. Upgrading probably won’t fix this, but it might…