Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@datadog/vis-fetch

Package Overview
Dependencies
Maintainers
1
Versions
207
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/vis-fetch

Datadog Data Visualization SDK - Data fetching / parsing functions for Datadog APIs

  • 1.2.3-next.6
  • npm
  • Socket score

Version published
Weekly downloads
204
increased by1754.55%
Maintainers
1
Weekly downloads
 
Created
Source

@datadog/vis-fetch

vis-fetch

This package provides functions for fetching and transforming data from Datadog sources.

Install

yarn add @datadog/vis-fetch

Documentation and Demos

Visit our live demos page for current examples.

Usage

import { init } from "@datadog/ui-extensions-sdk";
import {
  fetchMetrics,
  metricsResponseToDataFrame,
} from "@datadog/vis-fetch";

const datadogClient = init();

// See Datadog metrics query syntax
// https://docs.datadoghq.com/metrics/
const query = 'avg:system.cpu.user{*}';
const now = Date.now();
const timeframe = {
  live: false,
  start: now - 600 // 60 seconds * 10 minutes
  end: now
}

const rawResponse = fetchMetrics(query, timeframe, client);
const dataFrame = metricsResponseToDataFrame(rawResponse);

// You can pass the dataFrame to one of the graphs in @datadog/vis-draw, or use your own
// charting library

FAQs

Package last updated on 28 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc