Hello everyone! I am trying to start using analyti...
# troubleshoot
g
Hello everyone! I am trying to start using analytics page in our locally running Datahub instance (v0.8.39) The first half of the page is pretty empty, but that may be because we haven't been using it that long. However the second half of the analytics page is suspiciously empty, even more than I expected.
I started digging in, and found one issue: the graphql endpoint returns the chart data in a different format compared to the Datahub's demo instance:
GraphQL query
Copy code
query getAnalyticsCharts {
  getAnalyticsCharts {
    groupId
    title
    charts {
      ...analyticsChart2
    }
    __typename
  }
  __typename
}
fragment analyticsChart2 on AnalyticsChart {
  ... on TimeSeriesChart {
    title
    lines { name data {x y __typename } __typename }
    dateRange { start end __typename }
    interval
    __typename
  }
  ... on BarChart {
    title
    bars {
      name
      segments { label value __typename }
      __typename
    }
    __typename
  }
  ... on TableChart {
    title
    columns
    rows {
      values
      cells {
        value
        linkParams {
          searchParams {
            types
            query
            filters { field value __typename }
            __typename
          }
          entityProfileParams { urn type __typename }
          __typename
        }
        __typename
      }
      __typename
    }
    __typename
  }
  __typename
}
Datahub demo result
Copy code
{
    "data": {
        "getAnalyticsCharts": [
            {
                "groupId": "DataHubUsageAnalytics",
                "title": "DataHub Usage Analytics",
                "charts": [
                    {
                        "title": "Weekly Active Users",
                        "lines": [
                            {
                                "name": "total",
                                "data": [
                                    {
                                        "x": "2022-04-25T00:00:00.000Z",
                                        "y": 405,
                                        "__typename": "NumericDataPoint"
                                    },
                                    {
                                        "x": "2022-05-02T00:00:00.000Z",
                                        "y": 1255,
                                        "__typename": "NumericDataPoint"
                                    },
...
my Datahub instance result
Copy code
{
    "data": {
        "getAnalyticsCharts": [
            {
                "groupId": "DataHubUsageAnalytics",
                "title": "DataHub Usage Analytics",
                "charts": [
                    {
                        "title": "Weekly Active Users",
                        "lines": [
                            {
                                "name": "total",
                                "data": [
                                    {
                                        "x": "1652659200000",
                                        "y": 15,
                                        "__typename": "NumericDataPoint"
                                    },
                                    {
                                        "x": "1653264000000",
                                        "y": 0,
                                        "__typename": "NumericDataPoint"
                                    },
...
notice the
"x"
field being ISO-8601 in demo and UTC timestamp in string in my instance. any idea what could be causing that and how can I start debugging that?
currently running Datahub v0.8.39 (staging) and v0.8.33 (prod) with the results being the same on both
o
@big-carpet-38439 Any idea of what could be going on here? Looks like the usage index is storing values in an unexpected way.
g
this was caused by invalid creation of ES indexes during elasticsearch-setup job. we're using AWS OpenSearch and the index template creation never happened even though
USE_AWS_ELASTICSEARCH
is set to true so at some point I created the missing index
datahub_usage_event
manually and obviously messed it up somehow. when I recreated it manually once again with more attention to detail, it went ok. will investigate further.
👍 1