github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ui/src/views/cluster/containers/nodeGraphs/dashboards/changefeeds.tsx (about)

     1  // Copyright 2019 The Cockroach Authors.
     2  //
     3  // Use of this software is governed by the Business Source License
     4  // included in the file licenses/BSL.txt.
     5  //
     6  // As of the Change Date specified in that file, in accordance with
     7  // the Business Source License, use of this software will be governed
     8  // by the Apache License, Version 2.0, included in the file
     9  // licenses/APL.txt.
    10  
    11  import React from "react";
    12  
    13  import { LineGraph } from "src/views/cluster/components/linegraph";
    14  import { Metric, Axis, AxisUnits } from "src/views/shared/components/metricQuery";
    15  
    16  import { GraphDashboardProps } from "./dashboardUtils";
    17  
    18  export default function (props: GraphDashboardProps) {
    19    const { storeSources } = props;
    20  
    21    return [
    22      <LineGraph title="Max Changefeed Latency" sources={storeSources}>
    23        <Axis units={AxisUnits.Duration} label="time">
    24          <Metric name="cr.node.changefeed.max_behind_nanos" title="Max Changefeed Latency" downsampleMax aggregateMax />
    25        </Axis>
    26      </LineGraph>,
    27  
    28      <LineGraph title="Sink Byte Traffic" sources={storeSources}>
    29        <Axis units={AxisUnits.Bytes} label="bytes">
    30          <Metric name="cr.node.changefeed.emitted_bytes" title="Emitted Bytes" nonNegativeRate />
    31        </Axis>
    32      </LineGraph>,
    33  
    34      <LineGraph title="Sink Counts" sources={storeSources}>
    35        <Axis units={AxisUnits.Count} label="actions">
    36          <Metric name="cr.node.changefeed.emitted_messages" title="Messages" nonNegativeRate />
    37          <Metric name="cr.node.changefeed.flushes" title="Flushes" nonNegativeRate />
    38        </Axis>
    39      </LineGraph>,
    40  
    41      <LineGraph title="Sink Timings" sources={storeSources}>
    42        <Axis units={AxisUnits.Duration} label="time">
    43          <Metric name="cr.node.changefeed.emit_nanos" title="Message Emit Time" nonNegativeRate />
    44          <Metric name="cr.node.changefeed.flush_nanos" title="Flush Time" nonNegativeRate />
    45        </Axis>
    46      </LineGraph>,
    47  
    48      <LineGraph title="Changefeed Restarts" sources={storeSources}>
    49        <Axis units={AxisUnits.Count} label="actions">
    50          <Metric name="cr.node.changefeed.error_retries" title="Retryable Errors" nonNegativeRate />
    51        </Axis>
    52      </LineGraph>,
    53    ];
    54  }