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

each flags metic events are not displayed as it is. #9019

Open
songhohoon opened this issue Dec 23, 2024 · 4 comments
Open

each flags metic events are not displayed as it is. #9019

songhohoon opened this issue Dec 23, 2024 · 4 comments
Assignees
Labels

Comments

@songhohoon
Copy link

Describe the bug

flags metic is not displayed as the browsers timezone.
I installed unleash using helm chart.
my envrs are as followed

  • unleash server timezone : UTC
  • unleash database(postgresql) timezone : UTC
  • my current working location timezone : UTC+9

all features works fine except flag's metric graph.
all event logs on the frontend are displayed based on UTC+9. However, in the feature flag metric, graphs and tables are drawn based on UTC

Steps to reproduce the bug

No response

Expected behavior

all metric graph and table are display according to current timezone.

Logs, error output, etc.

It's just frontend bug.

Screenshots

image image

Additional context

I asked in unleash slack help channel.
https://unleash-community.slack.com/archives/C03GWTN7XMG/p1733199383887489

Unleash version

Open Source 6.3.0

Subscription type

Open source

Hosting type

Self-hosted

SDK information (language and version)

No response

@songhohoon songhohoon added the bug label Dec 23, 2024
@gastonfournier gastonfournier moved this from New to Investigating in Issues and PRs Jan 7, 2025
@gastonfournier gastonfournier moved this from Investigating to For later in Issues and PRs Jan 7, 2025
@gastonfournier
Copy link
Contributor

Thanks! This is a good report, we couldn't validate yet. We'll check it later but it's not top of our priorities

Can you run show timezone; in your postgres db?

@gastonfournier gastonfournier moved this from For later to Investigating in Issues and PRs Jan 7, 2025
@gastonfournier gastonfournier self-assigned this Jan 8, 2025
@songhohoon
Copy link
Author

@gastonfournier
yes. sure.
my postgresql timezone is UTC
image

@gastonfournier
Copy link
Contributor

Ok, we had a similar report in another graph, also related to timezone issues. We'll look into it

@daveleek
Copy link
Contributor

Hello @songhohoon and thank you for raising this!
I've been unable to reproduce this behavior. I tried locally and with a docker instance, running different timezones on my laptop, sending metrics data with different timezones, and looking at the result both in the browser and in the database table client_metrics_env. The feature metric graph seems to match what I expect from those experiments, and always shows relevant data for my computers local timezone regardless of which timezone that is.

There's a couple of things you could try to get closer to a cause for this. If you inspect the table client_metrics_env of your Postgres instance, and compare those numbers and date times to what you observe in the graph, does anything stand out there?

You can also try sending Unleash metrics for a feature for any given time to see how that ends up in the graph, Unleash will convert the time sent in to the matching time in it's current timezone (so should be UTC for your setup):

POST <your-unleash-instance-address>/api/client/metrics

Header:
Authorization: <your server SDK token>
{
  "appName": "appName",
  "instanceId": "instanceId",
  "bucket": {
    "start": "2025-01-20T09:00:00+09:00",
    "stop": "2025-01-20T09:15:00+09:00",
    "toggles": {
      "<flag name>": {
        "yes": 123,
        "no": 321
      },
    }
  }
}

Then you can play around with the above payload and the timezone to see how that affects your feature flag metric graph

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

No branches or pull requests

3 participants