Repeat steps 1-3 using an Unleash server instance backed by a Postgres database.
exec-ing into the Postgres container seems to show that the metrics data is present in the database correctly. (This was from a test run I did yesterday AM.)
postgres=# select * from client_metrics
postgres-# ;
id | created_at | metrics
-----+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
46 | 2019-04-18 11:51:56.718434+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:50:56.456Z","stop":"2019-04-18T07:51:56.672Z","toggles":{"Demo":{"yes":5,"no":0}}}}
47 | 2019-04-18 11:52:56.720726+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:51:56.706Z","stop":"2019-04-18T07:52:56.672Z","toggles":{"Demo":{"yes":6,"no":0}}}}
48 | 2019-04-18 11:53:56.714373+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:52:56.699Z","stop":"2019-04-18T07:53:56.667Z","toggles":{"Demo":{"yes":6,"no":0}}}}
49 | 2019-04-18 11:54:56.687185+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:53:56.695Z","stop":"2019-04-18T07:54:56.670Z","toggles":{"Demo":{"yes":6,"no":0}}}}
79 | 2019-04-18 11:58:35.136196+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:57:34.957Z","stop":"2019-04-18T07:58:35.107Z","toggles":{"Demo":{"yes":5,"no":0}}}}
80 | 2019-04-18 11:59:35.133494+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:58:35.151Z","stop":"2019-04-18T07:59:35.107Z","toggles":{"Demo":{"yes":6,"no":0}}}}
81 | 2019-04-18 12:00:35.146794+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T07:59:35.135Z","stop":"2019-04-18T08:00:35.104Z","toggles":{"Demo":{"yes":6,"no":0}}}}
82 | 2019-04-18 12:01:35.137373+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:00:35.157Z","stop":"2019-04-18T08:01:35.104Z","toggles":{"Demo":{"yes":6,"no":0}}}}
83 | 2019-04-18 12:02:35.172807+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:01:35.144Z","stop":"2019-04-18T08:02:35.110Z","toggles":{"Demo":{"yes":6,"no":0}}}}
84 | 2019-04-18 12:03:35.13187+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:02:35.184Z","stop":"2019-04-18T08:03:35.106Z","toggles":{"test":{"yes":0,"no":0},"Demo":{"yes":6,"no":0}}}}
85 | 2019-04-18 12:04:35.13085+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:03:35.134Z","stop":"2019-04-18T08:04:35.105Z","toggles":{"test":{"yes":0,"no":0},"Demo":{"yes":6,"no":0}}}}
115 | 2019-04-18 12:09:09.59915+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:08:09.475Z","stop":"2019-04-18T08:09:09.554Z","toggles":{"Demo":{"yes":5,"no":0},"test":{"yes":0,"no":0}}}}
116 | 2019-04-18 12:10:09.592847+00 | {"appName":"pyIvan","instanceId":"unleash-client-python","bucket":{"start":"2019-04-18T08:09:09.606Z","stop":"2019-04-18T08:10:09.559Z","toggles":{"Demo":{"yes":6,"no":0},"test":{"yes":0,"no":0}}}}
(13 rows)
postgres=# select * from client_applications;
app_name | created_at | updated_at | seen_at | strategies | description | icon | url | color
----------------------------+-------------------------------+-------------------------------+---------+----------------------------------------------------------------------------------------------------------------------------------------+-------------+------+-----+-------
unleash-python-integration | 2019-04-01 11:13:03.873981+00 | 2019-04-01 11:13:03.873981+00 | | ["applicationHostname","default","gradualRolloutRandom","gradualRolloutSessionId","gradualRolloutUserId","remoteAddress","userWithId"] | | | |
pyIvan | 2019-04-01 11:13:03.873981+00 | 2019-04-18 12:08:09.531497+00 | | ["applicationHostname","default","gradualRolloutRandom","gradualRolloutSessionId","gradualRolloutUserId","remoteAddress","userWithId"] | | | |
(2 rows)
postgres=# select * from client_instances;
app_name | instance_id | client_ip | last_seen | created_at | sdk_version
----------+-----------------------+-------------------+-------------------------------+-------------------------------+-----------------------------
pyIvan | unleash-client-python | ::ffff:172.19.0.1 | 2019-04-18 12:10:09.619072+00 | 2019-04-18 11:50:56.566464+00 | unleash-client-python:2.1.0
(1 row)
postgres=#
Oddly, if I run a local Unleash server pointed at a remote Postgres database (a free ElephantSQL database), it work totally fine!