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

Add API source to tracking data #22320

Merged
merged 10 commits into from
Feb 6, 2023
Merged

Conversation

jdpgrailsdev
Copy link
Contributor

@jdpgrailsdev jdpgrailsdev commented Feb 2, 2023

What

  • Track source of API requests in Segment
  • fix airbytehq/airbyte-internal-issues#1344

How

  • Check if the current HTTP request contains the API source header. If so, add it to the tracked data

Recommended reading order

  1. SegmentTrackingClient.java

Tests

  • Added unit test to verify behavior
  • All other tests pass
  • Project builds locally

@jdpgrailsdev jdpgrailsdev requested a review from a team as a code owner February 2, 2023 16:15
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 2, 2023 16:17 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 2, 2023 16:17 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 2, 2023 16:46 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 2, 2023 16:46 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev force-pushed the jonathan/track-api-source branch from e914d42 to baa668a Compare February 2, 2023 17:22
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 2, 2023 17:24 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 2, 2023 17:24 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 2, 2023 17:37 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 2, 2023 17:37 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 2, 2023 21:24 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 2, 2023 21:24 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2023

Airbyte Code Coverage

File Coverage [81.99%] 🍏
SegmentTrackingClient.java 93.31% 🍏
CorsFilter.java 0%
Total Project Coverage 24.53%

@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 3, 2023 17:26 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 3, 2023 17:26 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 3, 2023 20:35 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 3, 2023 20:35 — with GitHub Actions Inactive
@timroes
Copy link
Contributor

timroes commented Feb 5, 2023

The header will also be needed to added to the ACCESS_CONTROL_ALLOW_HEADERS headers in our CorsFilter, so we can send this header cross domain to the backend. This shouldn't be required for production strictly spoken, since we're usually run on the same domain, but during development we usually develop against a cloud backend, so it would be nice if we could have that header allowed for CORS.

@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 6, 2023 15:57 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 6, 2023 15:57 — with GitHub Actions Inactive
@jdpgrailsdev
Copy link
Contributor Author

ACCESS_CONTROL_ALLOW_HEADERS

@timroes The custom CorsFilter will go away once we convert Airbyte Cloud's wrapped server to Micronaut. I will add the header to it for now so it works in the meantime.

@octavia-squidington-iii octavia-squidington-iii added area/platform issues related to the platform area/server labels Feb 6, 2023
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 6, 2023 17:16 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev temporarily deployed to more-secrets February 6, 2023 17:16 — with GitHub Actions Inactive
@jdpgrailsdev jdpgrailsdev merged commit ac370c9 into master Feb 6, 2023
@jdpgrailsdev jdpgrailsdev deleted the jonathan/track-api-source branch February 6, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform area/server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants