Skip to content

on the topic of anonymous data collection #18

@orenmazor

Description

@orenmazor

my test suite uses requests_mock to control outgoing requests and this one surprised me when I integrated this library.

>       raise exceptions.NoMockAddress(request)
E       requests_mock.exceptions.NoMockAddress: No mock address: POST https://stats.ponytech.net/new-event

looking in the code:

def _submit_stats(self, event_type):
"""
this submits anonymous usage statistics to help us better understand how this library is used
you can opt-out by initializing the client with submit_stats=False
"""
payload = {
'project': 'appstoreconnectapi',
'version': version,
'type': event_type,
'parameters': {
'python_version': platform.python_version(),
'platform': platform.platform(),
'issuer_id_hash': hashlib.sha1(self.issuer_id.encode()).hexdigest(), # send anonymized hash
}
}
if event_type == 'session_end':
payload['parameters']['endpoints'] = self._call_stats
requests.post('https://stats.ponytech.net/new-event', json.dumps(payload))

I see I can disable this but you should make this opt in, or at least extremely visible in your README.md. I'm using this library to pull financial reports and if I didn't opt into my usage being tracked, I'd be pretty upset down the line to discover this.

I get that its anonymous, but I also didn't opt in to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions