Skip to content

Commit bec1390

Browse files
committed
Send uid and partial access_token up to Honeycomb.
1 parent 351bc78 commit bec1390

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

appstore/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import requests
88
from flask import request, abort, url_for
99

10+
import beeline
11+
1012
from .settings import config
1113
from appstore.models import App, AssetCollection, CompanionApp
1214

@@ -237,6 +239,7 @@ def get_access_token():
237239
access_token = auth[1]
238240
if not access_token:
239241
abort(401)
242+
beeline.add_context_field('access_token', access_token[:-8])
240243
return access_token
241244

242245

@@ -250,4 +253,5 @@ def get_uid():
250253
result = authed_request('GET', f"{config['REBBLE_AUTH_URL']}/api/v1/me?flag_authed=true")
251254
if result.status_code != 200:
252255
abort(401)
253-
return result.json()['uid']
256+
beeline.add_context_field('user', result.json()['uid'])
257+
return result.json()['uid']

0 commit comments

Comments
 (0)