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

Events not logged #92

Open
punndcoder28 opened this issue Aug 31, 2021 · 3 comments
Open

Events not logged #92

punndcoder28 opened this issue Aug 31, 2021 · 3 comments

Comments

@punndcoder28
Copy link

punndcoder28 commented Aug 31, 2021

I am facing an issue in one of our projects in my workplace where we have created 2 projects on Amplitude one of which is used for production usage and another for development/testing usage. The events that are being sent from development/testing environment are recorded in the production project on amplitude which should ideally not happen due to different API keys for each environment. We have followed the steps illustrated for installation and usage from the docs

SDK Version
@amplitude/react-native: 2.3.3

Things tried till now

  • upgrade amplitude SDK
  • recreate development/testing project with fresh API key

Edit 1:
Dug deeper to check what the exact issue is. We have the amplitude API key defined in an config file from which the right key is fetched depending on the environment in the reducer file. The event from development/test is recorded in the production project on amplitude when environments are switched. Amplitude is not able to differentiate between the two API keys. Is this the expected behaviour?

@haoliu-amp
Copy link
Contributor

I think it should be more a issue from your side. We should fetch whatever the key provided by the user.

@msulaiman119
Copy link

msulaiman119 commented May 30, 2022

I am facing same issue. I am integrating with React native. I followed the docs and i did all the steps. But the events are not showing in the log section.
I tried to execute the promise and its giving me true in return but still no events are visible inside log section

Any solution?

@punndcoder28
Copy link
Author

Hi @haoliu-amp . My sincere apologies for a late reply. Coming back to the issue, we have two projects that our application uses (prod and dev with their own unique api keys). We also have the following code that fetches the proper api key (can confirm this after logging the keys fetched) to initialize the instance and send our events

Amplitude.getInstance().init(Config.amplitude_key);
Amplitude.getInstance().logEvent(name, properties);

But since we start off in prod, even though we change to our dev env the events are not sent to the dev project but are sent to the prod project. I have checked if we are retrieving the right key and we are. I hope this makes a better sense

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

No branches or pull requests

3 participants