@google-cloud/opentelemetry-cloud-monitoring-exporter
    TypeScript icon, indicating that this package has built-in type declarations

    0.13.0 • Public • Published

    OpenTelemetry Google Cloud Monitoring Exporter

    NPM Published Version Apache License

    OpenTelemetry Google Cloud Monitoring Exporter allows the user to send collected metrics to Google Cloud Monitoring.

    Cloud Monitoring provides visibility into the performance, uptime, and overall health of cloud-powered applications. It collects metrics, events, and metadata from Google Cloud, Amazon Web Services, hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch, and many others. Operations ingests that data and generates insights via dashboards, charts, and alerts. Cloud Monitoring alerting helps you collaborate by integrating with Slack, PagerDuty, and more.

    Installation

    npm install --save @opentelemetry/sdk-metrics-base
    npm install --save @google-cloud/opentelemetry-cloud-monitoring-exporter

    Usage

    const { MeterProvider }  = require('@opentelemetry/sdk-metrics-base');
    const { MetricExporter } = require('@google-cloud/opentelemetry-cloud-monitoring-exporter');
    
    const exporter = new MetricExporter();
    
    // Register the exporter
    const meter = new MeterProvider({
      exporter,
      interval: 60000,
    }).getMeter('example-meter');
    
    // Now, start recording data
    const counter = meter.createCounter('metric_name');
    counter.add(10, { [key]: 'value' });

    Viewing your metrics:

    With the above you should now be able to navigate to the Google Cloud Monitoring UI at: https://console.cloud.google.com/monitoring

    Useful links

    Install

    npm i @google-cloud/opentelemetry-cloud-monitoring-exporter

    DownloadsWeekly Downloads

    2,426

    Version

    0.13.0

    License

    Apache-2.0

    Unpacked Size

    44.6 kB

    Total Files

    17

    Last publish

    Collaborators

    • ofrobots
    • google-wombot
    • google-admin
    • soldair