amplitude / amplitude/homebrew-ampli
ServerZone not taken into account
- Vorherrschende Sprache
- Ruby
- Sterne
- 2
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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).
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.