Skip to content

Commit 74b8110

Browse files
markzegarellirchinn1
andauthored
Add instructions for host param to server-side sources (#3097)
* Add instructions for host param to server-side sources * Apply suggestions from code review Co-authored-by: rchinn-segment <[email protected]> Co-authored-by: rchinn-segment <[email protected]>
1 parent 98f435e commit 74b8110

File tree

10 files changed

+52
-15
lines changed

10 files changed

+52
-15
lines changed

src/connections/sources/catalog/libraries/server/clojure/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ using the `Analytics` singleton anywhere in your code.
4848

4949
The default initialization settings are production-ready.
5050

51+
### Regional configuration
52+
For Business plans with access to [Regional Segment](/docs/guides/regional-segment), you can use the `host` configuration parameter to send data to the desired region:
53+
1. Oregon (Default) — `api.segment.io/v1`
54+
2. Dublin — `events.eu1.segmentapis.com/v1/`
55+
5156
## Identify
5257

5358
`identify` lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about them.

src/connections/sources/catalog/libraries/server/go/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ All of Segment's server-side libraries are built for high-performance, so you ca
1313

1414
## Getting Started
1515

16-
### Install the Package
1716

1817
Install `analytics-go` using `go get`:
1918

@@ -40,6 +39,11 @@ That will create a `client` that you can use to send data to Segment for your so
4039

4140
The default initialization settings are production-ready and queue 20 messages before sending a batch request, and a 5 second interval.
4241

42+
### Regional configuration
43+
For Business plans with access to [Regional Segment](/docs/guides/regional-segment), you can use the `host` configuration parameter to send data to the desired region:
44+
1. Oregon (Default) — `api.segment.io/v1`
45+
2. Dublin — `events.eu1.segmentapis.com/v1/`
46+
4347
## Identify
4448

4549
> note ""

src/connections/sources/catalog/libraries/server/http-api/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ The HTTP API has no hard rate limit. However, Segment recommends not exceeding 5
3434

3535
There is a maximum of `32KB` per normal API request. The `batch` API endpoint accepts a maximum of `500KB` per request, with a limit of `32KB` per event in the batch. If you are sending data from a server source, Segment's API responds with `400 Bad Request` if these limits are exceeded.
3636

37+
## Regional configuration
38+
For Business plans with access to [Regional Segment](/docs/guides/regional-segment), you can use the `host` configuration parameter to send data to the desired region:
39+
1. Oregon (Default) — `api.segment.io/v1`
40+
2. Dublin — `events.eu1.segmentapis.com/v1/`
41+
3742
## Identify
3843

3944
`identify` lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about them.

src/connections/sources/catalog/libraries/server/java/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ Want to stay updated on releases? Subscribe to the [release feed](https://github
1818

1919
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.segment.analytics.java/analytics/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.segment.analytics.java/analytics)
2020

21-
22-
### Install the library
23-
24-
The recommended way to install the library for Java is with a build system like Gradle or Maven. This makes it simple to upgrade and swap out destinations. The library is distributed using [Maven Central](http://maven.org/) as a `jar` dependency.
21+
The recommended way to install the library for Java is with a build system like Gradle or Maven. This makes it simple to upgrade and swap out destinations. The library is distributed using [Maven Central](http://maven.org/){:target="_blank"} as a `jar` dependency.
2522

2623
Here's what it would look like with Maven:
2724

@@ -43,7 +40,7 @@ implementation 'com.segment.analytics.java:analytics:+'
4340

4441
### Initialize the SDK
4542

46-
Before you can send us events, you need to initialize an instance of the Analytics class. To do so, you must use the `Analytics.Builder` class.
43+
Before you can send events to Segment, you need to initialize an instance of the Analytics class. To do so, you must use the `Analytics.Builder` class.
4744

4845
```java
4946
Analytics analytics = Analytics.builder(writeKey).build();
@@ -61,7 +58,10 @@ Although not enforced at compile time, make sure you provide either of `userId`
6158

6259
The following examples use [Guava's](https://github.com/google/guava) immutable maps, but feel free to use plain old Java maps instead.
6360

64-
61+
### Regional configuration
62+
For Business plans with access to [Regional Segment](/docs/guides/regional-segment), you can use the `host` configuration parameter to send data to the desired region:
63+
1. Oregon (Default) — `api.segment.io/v1`
64+
2. Dublin — `events.eu1.segmentapis.com/v1/`
6565
## Identify
6666

6767
> note ""

src/connections/sources/catalog/libraries/server/kotlin/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ To get started with the Analytics-Kotlin server library:
6464
`trackDeepLinks` | Default set to `false`. <br> Set to `true` to automatically track opened Deep Links based on intents. |
6565
`useLifecycleObserver` | Default set to `false`. <br> Set to `true` to use `LifecycleObserver` to track Application lifecycle events. |
6666
67-
67+
### Regional configuration
68+
For Business plans with access to [Regional Segment](/docs/guides/regional-segment), you can use the `host` configuration parameter to send data to the desired region:
69+
1. Oregon (Default) — `api.segment.io/v1`
70+
2. Dublin — `events.eu1.segmentapis.com/v1/`
6871
## Tracking Methods
6972
7073
Once you've installed the mobile or server Analytics-Kotlin library, you can start collecting data through Segment's tracking methods:

src/connections/sources/catalog/libraries/server/net/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ You only need to initialize once at the start of your program. You can then keep
7878

7979
The default initialization settings are production-ready and queue messages on another thread before sending any requests. In development you might want to use [development settings](/docs/connections/sources/catalog/libraries/server/net/#development-settings).
8080

81+
### Regional configuration
82+
For Business plans with access to [Regional Segment](/docs/guides/regional-segment), you can use the `host` configuration parameter to send data to the desired region:
83+
1. Oregon (Default) — `api.segment.io/v1`
84+
2. Dublin — `events.eu1.segmentapis.com/v1/`
85+
8186
## Identify
8287

8388
> note ""

src/connections/sources/catalog/libraries/server/node/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ Want to stay updated on releases? Subscribe to the [release feed](https://github
1414

1515
## Getting Started
1616

17-
### Install the Module
18-
1917
Run:
2018

2119
```bash
@@ -33,6 +31,10 @@ Of course, you'll want to replace `YOUR_WRITE_KEY` with your actual **Write Key*
3331

3432
This will create an instance of `Analytics` that you can use to send data to Segment for your project. The default initialization settings are production-ready and queue 20 messages before sending any requests. In development you might want to use [development settings](/docs/connections/sources/catalog/libraries/server/node/#development).
3533

34+
### Regional configuration
35+
For Business plans with access to [Regional Segment](/docs/guides/regional-segment), you can use the `host` configuration parameter to send data to the desired region:
36+
1. Oregon (Default) — `api.segment.io/v1`
37+
2. Dublin — `events.eu1.segmentapis.com/v1/`
3638
## Identify
3739

3840
> note ""

src/connections/sources/catalog/libraries/server/php/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ Of course, you'll want to replace `YOUR_WRITE_KEY` with your actual **Write Key*
4343

4444
The default PHP consumer is the [lib-curl consumer](#lib-curl-consumer). If this is not working well for you, or if you have a high-volume project, you may want to try one of our other consumers like the [fork-curl consumer](#fork-curl-consumer).
4545

46+
### Regional configuration
47+
For Business plans with access to [Regional Segment](/docs/guides/regional-segment), you can use the `host` configuration parameter to send data to the desired region:
48+
1. Oregon (Default) — `api.segment.io/v1`
49+
2. Dublin — `events.eu1.segmentapis.com/v1/`
50+
4651
## Identify
4752

4853
> note ""

src/connections/sources/catalog/libraries/server/python/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Analytics for Python
33
id: XRksQPCr7X
44
---
5-
Our Python library lets you record analytics data from your Python code. The requests hit our servers, and then we route your data to any analytics service you enable on your destinations page.
5+
Segment's Python library lets you record analytics data from your Python code. The requests hit Segment's servers, and then we route your data to any analytics service you enable on your destinations page.
66

77
This library is open-source, so you can [check it out on GitHub](https://github.com/segmentio/analytics-python).
88

@@ -53,6 +53,11 @@ analytics.send = False
5353

5454
**Using Django?** Check out the [Django docs](/docs/connections/sources/catalog/libraries/server/python/#django).
5555

56+
### Regional configuration
57+
For Business plans with access to [Regional Segment](/docs/guides/regional-segment), you can use the `host` configuration parameter to send data to the desired region:
58+
1. Oregon (Default) — `api.segment.io/v1`
59+
2. Dublin — `events.eu1.segmentapis.com/v1/`
60+
5661
## Identify
5762

5863
> note ""

src/connections/sources/catalog/libraries/server/ruby/index.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ All of Segment's server-side libraries are built for high-performance, so you ca
1414

1515
## Getting Started
1616

17-
### Install the Gem
18-
19-
If you're using bundler, add the following line to your project's `Gemfile`:
17+
If you're using Bundler, add the following line to your project's `Gemfile`:
2018

2119
```ruby
2220
gem 'analytics-ruby', '~> 2.4.0', :require => 'segment/analytics'
@@ -44,7 +42,12 @@ That will create an instance of `Analytics` that you can use to send data to Seg
4442
If you're using Rails, you can stick that initialization logic in `config/initializers/analytics_ruby.rb` and omit the `require` call.
4543

4644
> info ""
47-
> The analytics-ruby gem makes requests asynchronously, which can sometimes be suboptimal and difficult to debug if you're pairing it with a queuing system like Sidekiq/delayed job/sucker punch/resqueue. If you'd prefer to use a gem that makes requests synchronously, you can check out [`simple_segment`](https://github.com/whatthewhat/simple_segment), an API-compatible drop-in replacement for the standard gem that does its work synchronously inline. Big thanks to [Mikhail Topolskiy](https://github.com/whatthewhat) for his stewardship of this alternative gem!
45+
> The analytics-ruby gem makes requests asynchronously, which can sometimes be suboptimal and difficult to debug if you're pairing it with a queuing system like Sidekiq/delayed job/sucker punch/resqueue. If you'd prefer to use a gem that makes requests synchronously, you can check out [`simple_segment`](https://github.com/whatthewhat/simple_segment){:target="_blank"} , an API-compatible drop-in replacement for the standard gem that does its work synchronously inline. Big thanks to [Mikhail Topolskiy](https://github.com/whatthewhat){:target="_blank"} for his stewardship of this alternative gem!
46+
47+
### Regional configuration
48+
For Business plans with access to [Regional Segment](/docs/guides/regional-segment), you can use the `host` configuration parameter to send data to the desired region:
49+
1. Oregon (Default) — `api.segment.io/v1`
50+
2. Dublin — `events.eu1.segmentapis.com/v1/`
4851

4952
## Identify
5053

0 commit comments

Comments
 (0)