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

[APM] Time on x-axis doesn't align with time in tooltip #47832

Closed
insanity13 opened this issue Oct 10, 2019 · 5 comments · Fixed by #48355
Closed

[APM] Time on x-axis doesn't align with time in tooltip #47832

insanity13 opened this issue Oct 10, 2019 · 5 comments · Fixed by #48355
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support

Comments

@insanity13
Copy link

I cannot match the time values with the abscissa signatures.

image

@sorenlouv sorenlouv transferred this issue from elastic/apm-agent-dotnet Oct 10, 2019
@sorenlouv sorenlouv added the Team:APM All issues that need APM UI Team support label Oct 10, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@sorenlouv sorenlouv added the bug Fixes for quality problems that affect the customer experience label Oct 10, 2019
@sorenlouv
Copy link
Member

Hi there 👋

This definitely looks like a bug. I would appreciate it if you can provide me with some additional information.

1. narrow down to single transaction
First, let's narrow this down to a single transaction. You can do that by filtering in the query bar (transaction.id:), and the autocomplete should suggest you some ids. Pick any you like.
Screen Shot 2019-10-10 at 16 37 23

2. View transaction in UI
Now you should see a single spike in the UI (If not try to expand your time range). Please hover the spike and note down the timestamp like:
Screen Shot 2019-10-10 at 16 44 18

3. Find the transaction in Elasticsearch via Kibana Dev Tools
Go to Kibana Dev Tools and execute the following query:

GET apm-*-transaction*/_search
{
  "_source": "@timestamp", 
  "query": {
    "match": {
      "transaction.id": "<YOUR TRANSACTION ID>"
    }
  }
}

Remember to replace the transaction.id with your own

Screen Shot 2019-10-10 at 16 53 35

I'm interested to hear how the timestamp in the UI compares with the timestamp in Elasticsearch. I suspect there might be a timezone issue going on. What timezone are you in?

@insanity13
Copy link
Author

> What timezone are you in?
My time zone: SAMT (Samara Time), UTC/GMT +4 hours
Server Time zone: (UTC-05:00) Eastern Time (US & Canada)
Kibana Settings:
image

@insanity13
Copy link
Author

Single Spike:
image

{ "took" : 5, "timed_out" : false, "_shards" : { "total" : 2, "successful" : 2, "skipped" : 0, "failed" : 0 }, "hits" : { "total" : { "value" : 1, "relation" : "eq" }, "max_score" : 11.583956, "hits" : [ { "_index" : "apm-7.4.0-transaction-000001", "_type" : "_doc", "_id" : "oSbZtm0BDne2cmEGusrJ", "_score" : 11.583956, "_source" : { "@timestamp" : "2019-10-10T18:06:13.961Z" } } ] } }

@sorenlouv
Copy link
Member

sorenlouv commented Oct 11, 2019

Thanks for your help. I've created this issue to track this problem.

The main problem is that the Kibana timezone settings are different from your local browser timezone settings. APM UI unfortunately doesn't handle this case well at the moment.

As a workaround you can change the Kibana Timezone settings to match that of your local browser. This only works if you don't have colleagues in other timezones who also uses the Kibana instance.

@sorenlouv sorenlouv changed the title How to understand the graphics? [APM] Time on x-axis doesn't align with time in tooltip Oct 16, 2019
smith added a commit to smith/kibana that referenced this issue Oct 18, 2019
* Don't set the timezone anywhere in APM since it's already set in autoload
* Always use the local timezone for the chart tooltip

This makes the timezone handling consitently use the users set preference _except_ in the charts where the local time is always used.

In the charts we have to go through react-vis and d3-scale and nothing I tried to modify the scale on the x-axis ever really worked. We could revisit this later.

Fixes elastic#47832
Fixes elastic#48355
smith added a commit to smith/kibana that referenced this issue Oct 18, 2019
* Don't set the timezone anywhere in APM since it's already set in autoload

For the chart X-axes:

* Create nice ticks for the configured timezone (ie at 1w, 1d, 12hrs interval) by offsetting the xMin/xMax
* Explicitly pass those tick values to the x-axis
* When formatting, use scaleUtc to format everything as UTC, and offset the time again with the configured timezone.

Fixes elastic#47832
Fixes elastic#48355
smith added a commit that referenced this issue Oct 22, 2019
* Don't set the timezone anywhere in APM since it's already set in autoload

For the chart X-axes:

* Create nice ticks for the configured timezone (ie at 1w, 1d, 12hrs interval) by offsetting the xMin/xMax
* Explicitly pass those tick values to the x-axis
* When formatting, use scaleUtc to format everything as UTC, and offset the time again with the configured timezone.

Fixes #47832
Fixes #48355
smith added a commit to smith/kibana that referenced this issue Oct 22, 2019
* Don't set the timezone anywhere in APM since it's already set in autoload

For the chart X-axes:

* Create nice ticks for the configured timezone (ie at 1w, 1d, 12hrs interval) by offsetting the xMin/xMax
* Explicitly pass those tick values to the x-axis
* When formatting, use scaleUtc to format everything as UTC, and offset the time again with the configured timezone.

Fixes elastic#47832
Fixes elastic#48355
smith added a commit that referenced this issue Oct 22, 2019
* Don't set the timezone anywhere in APM since it's already set in autoload

For the chart X-axes:

* Create nice ticks for the configured timezone (ie at 1w, 1d, 12hrs interval) by offsetting the xMin/xMax
* Explicitly pass those tick values to the x-axis
* When formatting, use scaleUtc to format everything as UTC, and offset the time again with the configured timezone.

Fixes #47832
Fixes #48355
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants