Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: log API client #531

Merged
merged 2 commits into from
Nov 11, 2024
Merged

feat: log API client #531

merged 2 commits into from
Nov 11, 2024

Conversation

jsstevenson
Copy link
Contributor

@jsstevenson jsstevenson commented Nov 11, 2024

The intention here is that we can tell if dgipy is being used to issue requests against the API

@jsstevenson jsstevenson added the priority:low Low priority label Nov 11, 2024
@jsstevenson jsstevenson changed the base branch from main to dev November 11, 2024 16:57
@@ -8,7 +8,8 @@ def analyze_query(query: )
params = {
user_ip: query.context[:request_ip],
query: query.query_string.squish,
query_variables: query.provided_variables
query_variables: query.provided_variables,
client_type: request.headers['dgidb-client-name']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested it myself, but I don't believe request is available in here by default. You may have to grab this value in the controller and pass it in via the query context (like the ip address).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what I get for forcing a PR out before lunch

Copy link
Member

@acoffman acoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jsstevenson jsstevenson merged commit 60c44e3 into dev Nov 11, 2024
4 checks passed
@jsstevenson jsstevenson deleted the dgipy-log branch November 11, 2024 19:10
mcannon068nw added a commit that referenced this pull request Dec 6, 2024
* feat: store score components in DB (#518)

* fix: update JAX-CKB URL (#521)

* feat: jax-ckb -> ckb-core (#522)

* fix: chembl version (#524)

* feat: define rake task to generate TSVs (#523)

* fix: remove redundant field (#527)

* build: remove some unused rails boilerplate/imports (#528)

* fix: use declared data version value (#525)

* fix: remove redundant code (#529)

* cicd: update actions revs (#530)

* feat: log graphql requests (#526)

* feat: log API client (#531)

* chore: remove unused readme (#532)

* fix: use docm snapshot data (#533)

* fix: update api uri (#538)

* cicd: add DB check script (#543)

* chore: fix a couple of typos/omissions (#541)

* fix: use latest GO api changes (#542)

* add rows for Download table for 2024 tsvs (#549)

* new row for old Downloads file

* added one more row

---------

Co-authored-by: Cannon <[email protected]>

---------

Co-authored-by: James Stevenson <[email protected]>
Co-authored-by: Cannon <[email protected]>
mcannon068nw added a commit that referenced this pull request Dec 6, 2024
* feat: store score components in DB (#518)

* fix: update JAX-CKB URL (#521)

* feat: jax-ckb -> ckb-core (#522)

* fix: chembl version (#524)

* feat: define rake task to generate TSVs (#523)

* fix: remove redundant field (#527)

* build: remove some unused rails boilerplate/imports (#528)

* fix: use declared data version value (#525)

* fix: remove redundant code (#529)

* cicd: update actions revs (#530)

* feat: log graphql requests (#526)

* feat: log API client (#531)

* chore: remove unused readme (#532)

* fix: use docm snapshot data (#533)

* fix: update api uri (#538)

* cicd: add DB check script (#543)

* chore: fix a couple of typos/omissions (#541)

* fix: use latest GO api changes (#542)

* add rows for Download table for 2024 tsvs (#549)

* new row for old Downloads file

* added one more row

---------

Co-authored-by: Cannon <[email protected]>

---------

Co-authored-by: James Stevenson <[email protected]>
Co-authored-by: Cannon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low Low priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants