amplitude / amplitude/homebrew-ampli
ServerZone not taken into account
- 主要言語
- Ruby
- スター
- 2
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
My apologies if this repo is not the correct one to report these kinds of issues. I was unable to find the source code in any repo, except for the release section of this one, as a tarball.
The issue I am having with the Ampli CLI is that while the `ampli.json` is correctly generated, with a `"Zone": "eu"` property,
this is not reflected in the generated Java code.
In this section of `Ampli.java`, around line `#100`:
```
if (client != null) {
this.client = client;
} else if (apiKey != null && !apiKey.equals("")) {
Configuration config;
if (clientOptions != null && clientOptions.getConfiguration() != null) {
config = clientOptions.getConfiguration();
} else {
config = new DefaultConfiguration(apiKey, appContext.getApplicationContext(), defaultObservePlan);
}
this.client = new Amplitude(config);
} else {
System.err.println("Ampli.getInstance().load() requires 'environment', 'client.apiKey', or 'client.instance'");
return;
}
```
There should be an additional line that sets the proper server zone into the configuration, ideally right before creating the Amplitude instance:
```
config.setServerZone(ServerZone.EU);
```
As far as I could find, there is no elegant way to do this with the generated constructs (loaders and builders).
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。