Skip to content

Update custom-proxy.md #4243

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

Merged
merged 6 commits into from
Mar 1, 2023
Merged

Update custom-proxy.md #4243

merged 6 commits into from
Mar 1, 2023

Conversation

prigiattiperrut
Copy link
Contributor

Add information from the README file to the public docs https://github.com/segmentio/analytics-next/pull/793/files

@prigiattiperrut prigiattiperrut marked this pull request as ready for review February 16, 2023 16:40
@prigiattiperrut prigiattiperrut requested a review from a team as a code owner February 16, 2023 16:40
@prigiattiperrut prigiattiperrut requested review from stayseesong and removed request for a team February 16, 2023 16:40
@silesky
Copy link
Contributor

silesky commented Feb 16, 2023

Thanks for putting this up.
We likely want to add divide this up into "npm users" and "snippet users" and add instructions for how snippet users can modify their snippet to do the same thing.

@stayseesong
Copy link
Contributor

@silesky can you add your suggestions as suggestions to the file please?

stayseesong and others added 2 commits February 22, 2023 11:10
Co-authored-by: Seth Silesky <5115498+silesky@users.noreply.github.com>
@stayseesong stayseesong requested a review from silesky February 22, 2023 21:31
@stayseesong
Copy link
Contributor

@silesky and @prigiattiperrut I edited the formatting of the doc a bit. Please let me know if these changes work

To proxy tracking calls that typically go to `api.segment.io/v1`, replace:
```diff
- analytics.load("<MY_WRITE_KEY>")
+ analytics.load("<MY_WRITE_KEY>", { integrations: { "Segment.io": { apiHost: "MY-CUSTOM-API-PROXY.com" }}})
Copy link
Contributor

@silesky silesky Feb 22, 2023

Choose a reason for hiding this comment

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

cc @pooyaj, @chrisradek -- IIRC, we have a place in the UI where we also allow apiHost to be overridden for custom domain customers -- if so, the "apiHost" configuration here is not necessary?

Should we leave a note about this?

Copy link
Contributor

@silesky silesky Feb 27, 2023

Choose a reason for hiding this comment

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

@prigiattiperrut --

It looks like according to @pooyaj we actually want to nudge customers towards using the UI for updating apiHost.
Choices. Should we:

  • publish these docs 'as is'
  • wait until we've removed the feature flag, and then update the docs to use the apiHost UI.

for example, we had cases where we want to figure out “which sources of a given customer use proxy to send data rather than directly through the tracking API” … it is really difficult to figure that out if they hard code api host in their snippet, but if they set it through the App it will be an easy query to find out.

https://github.com/segmentio/app/blob/77ff57aac27a98f207ea6bc828a118e0d5bb3340/client/components/Sources/Settings/AnalyticsJs.tsx#L485-L523?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm! Sorry, I will have to ask a few questions in return, just to clarify:

  1. How often do we need to figure out which sources are proxying Segment?
  2. Do we have an ETA for when the apiHost UI will be available to all customers by default?

I think if the answer to #1 is not very often and #2 we don't have an ETA, it will take some time, then I believe that we could still make this information available to customers as they will benefit from knowing it.

Copy link
Contributor

@silesky silesky Feb 28, 2023

Choose a reason for hiding this comment

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

How often do we need to figure out which sources are proxying Segment?

That's a question for @pooyaj -- but it's more of a nice to have

Do we have an ETA for when the apiHost UI will be available to all customers by default?

I have no idea -- that's not my team =) I was hoping you knew who was in charge (or if it's up to us to make the PR)

I think if the answer is not very often and we don't have an ETA, it will take some time, then I believe that we could still make this information available to customers as they will benefit from knowing it.

Agree, we should make the docs update with the information we have! Especially since there's some big restrictions to in-domain

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree we should push the update rather than wait for the UI.

@silesky
Copy link
Contributor

silesky commented Feb 27, 2023

@prigiattiperrut I just realized since maybe most people are snippet users, I think it would make sense to switch the order of the snippet instructions and the npm library instructions -- lest that be confusing =)

stayseesong and others added 2 commits March 1, 2023 10:30
…ustom-proxy.md

Co-authored-by: Seth Silesky <5115498+silesky@users.noreply.github.com>
@stayseesong
Copy link
Contributor

@silesky I moved the snippet users to the top. Is it good to go now?

@stayseesong stayseesong merged commit 9e97af2 into develop Mar 1, 2023
@stayseesong stayseesong deleted the prigiattiperrut-patch-2 branch March 1, 2023 23:07
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2023

Thank you for your contribution! Your pull request is merged, but may take a day or two to appear on the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants