{"action":"created","issue":{"url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/130","labels_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/130/comments","events_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/130/events","html_url":"https://github.com/cloudfoundry-incubator/cf-abacus/issues/130","id":113416190,"number":130,"title":"Duplicate issue for a service instance bound to 2 apps","user":{"login":"AzureEnigma","id":7253488,"avatar_url":"https://avatars.githubusercontent.com/u/7253488?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureEnigma","html_url":"https://github.com/AzureEnigma","followers_url":"https://api.github.com/users/AzureEnigma/followers","following_url":"https://api.github.com/users/AzureEnigma/following{/other_user}","gists_url":"https://api.github.com/users/AzureEnigma/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureEnigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureEnigma/subscriptions","organizations_url":"https://api.github.com/users/AzureEnigma/orgs","repos_url":"https://api.github.com/users/AzureEnigma/repos","events_url":"https://api.github.com/users/AzureEnigma/events{/privacy}","received_events_url":"https://api.github.com/users/AzureEnigma/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"jsdelfino","id":247394,"avatar_url":"https://avatars.githubusercontent.com/u/247394?v=3","gravatar_id":"","url":"https://api.github.com/users/jsdelfino","html_url":"https://github.com/jsdelfino","followers_url":"https://api.github.com/users/jsdelfino/followers","following_url":"https://api.github.com/users/jsdelfino/following{/other_user}","gists_url":"https://api.github.com/users/jsdelfino/gists{/gist_id}","starred_url":"https://api.github.com/users/jsdelfino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsdelfino/subscriptions","organizations_url":"https://api.github.com/users/jsdelfino/orgs","repos_url":"https://api.github.com/users/jsdelfino/repos","events_url":"https://api.github.com/users/jsdelfino/events{/privacy}","received_events_url":"https://api.github.com/users/jsdelfino/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/milestones/5","html_url":"https://github.com/cloudfoundry-incubator/cf-abacus/milestones/0.0.2","labels_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/milestones/5/labels","id":1367651,"number":5,"title":"0.0.2","description":"","creator":{"login":"jsdelfino","id":247394,"avatar_url":"https://avatars.githubusercontent.com/u/247394?v=3","gravatar_id":"","url":"https://api.github.com/users/jsdelfino","html_url":"https://github.com/jsdelfino","followers_url":"https://api.github.com/users/jsdelfino/followers","following_url":"https://api.github.com/users/jsdelfino/following{/other_user}","gists_url":"https://api.github.com/users/jsdelfino/gists{/gist_id}","starred_url":"https://api.github.com/users/jsdelfino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsdelfino/subscriptions","organizations_url":"https://api.github.com/users/jsdelfino/orgs","repos_url":"https://api.github.com/users/jsdelfino/repos","events_url":"https://api.github.com/users/jsdelfino/events{/privacy}","received_events_url":"https://api.github.com/users/jsdelfino/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":5,"state":"open","created_at":"2015-10-21T05:35:33Z","updated_at":"2015-10-27T15:14:10Z","due_on":"2015-10-30T07:00:00Z","closed_at":null},"comments":3,"created_at":"2015-10-26T18:07:49Z","updated_at":"2015-10-27T15:17:24Z","closed_at":null,"body":"When I send the payload, I get duplicate submission. This is for when the same service is bound to 2 different apps, and the apps are using it at the same time.\r\n\r\nPayload\r\n```javascript\r\n{\r\n  \"service_id\":\"service_id\",\r\n  \"service_instance_id\": \"instance_id\",\r\n    \"usage\":[\r\n      {\r\n        \"start\":1445882317000,\r\n        \"end\":1445882317000,\r\n        \"organization_guid\":\"org_guid\",\r\n        \"space_guid\":\"space_guid\",\r\n        \"consumer\": {\r\n          \"type\":\"cloud-foundry-application\",\r\n          \"value\":\"app1\"\r\n        },\r\n        \"resources\": [ {\r\n          \"unit\":\"BYTE\",\r\n          \"quantity\":10\r\n        }, {\r\n          \"unit\":\"LIGHT_API_CALL\",\r\n          \"quantity\":10\r\n        }, {\r\n          \"unit\":\"HEAVY_API_CALL\",\r\n          \"quantity\":10\r\n        } ]\r\n      }, {\r\n        \"start\":1445882317000,\r\n        \"end\":1445882317000,\r\n        \"organization_guid\":\"org_guid\",\r\n        \"space_guid\":\"space_guid\",\r\n        \"consumer\": {\r\n          \"type\":\"cloud-foundry-application\",\r\n          \"value\":\"app2\"\r\n        },\r\n        \"resources\": [ {\r\n          \"unit\":\"BYTE\",\r\n          \"quantity\":10\r\n        }, {\r\n          \"unit\":\"LIGHT_API_CALL\",\r\n          \"quantity\":10\r\n        }, {\r\n          \"unit\":\"HEAVY_API_CALL\",\r\n          \"quantity\":10\r\n        } ]\r\n    }\r\n  ]\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/comments/151537370","html_url":"https://github.com/cloudfoundry-incubator/cf-abacus/issues/130#issuecomment-151537370","issue_url":"https://api.github.com/repos/cloudfoundry-incubator/cf-abacus/issues/130","id":151537370,"user":{"login":"jsdelfino","id":247394,"avatar_url":"https://avatars.githubusercontent.com/u/247394?v=3","gravatar_id":"","url":"https://api.github.com/users/jsdelfino","html_url":"https://github.com/jsdelfino","followers_url":"https://api.github.com/users/jsdelfino/followers","following_url":"https://api.github.com/users/jsdelfino/following{/other_user}","gists_url":"https://api.github.com/users/jsdelfino/gists{/gist_id}","starred_url":"https://api.github.com/users/jsdelfino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsdelfino/subscriptions","organizations_url":"https://api.github.com/users/jsdelfino/orgs","repos_url":"https://api.github.com/users/jsdelfino/repos","events_url":"https://api.github.com/users/jsdelfino/events{/privacy}","received_events_url":"https://api.github.com/users/jsdelfino/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T15:17:24Z","updated_at":"2015-10-27T15:17:24Z","body":"We'll be able to confirm once we see the correct JSON being sent to Abacus, but I think the issue is that the meter and accumulator services should add the consumer id (or 'unknown' if the consumer is unknown' to the keys they use to form usage doc ids."}}