
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
rhizo-co-google-cloudopentelemetry-cloud-monitoring-exporter
Advanced tools
OpenTelemetry Google Cloud Monitoring Exporter allows the user to send collected metrics to Google Cloud Monitoring.
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.
npm install --save @opentelemetry/sdk-metrics
npm install --save @google-cloud/opentelemetry-cloud-monitoring-exporter
const { MeterProvider, PeriodicExportingMetricReader } = require("@opentelemetry/sdk-metrics");
const { Resource } = require("@opentelemetry/resources");
const { MetricExporter } = require("@google-cloud/opentelemetry-cloud-monitoring-exporter");
const { GcpDetectorSync } = require("rhizo-co-google-cloud-opentelemetry-resource-util");
// Create MeterProvider
const meterProvider = new MeterProvider({
// Create a resource. Fill the `service.*` attributes in with real values for your service.
// GcpDetectorSync will add in resource information about the current environment if you are
// running on GCP. These resource attributes will be translated to a specific GCP monitored
// resource if running on GCP. Otherwise, metrics will be sent with monitored resource
// `generic_task`.
resource: new Resource({
"service.name": "example-metric-service",
"service.namespace": "samples",
"service.instance.id": "12345",
}).merge(new GcpDetectorSync().detect()),
});
// Register the exporter
meterProvider.addMetricReader(
new PeriodicExportingMetricReader({
// Export metrics every 10 seconds. 5 seconds is the smallest sample period allowed by
// Cloud Monitoring.
exportIntervalMillis: 10_000,
exporter: new MetricExporter(),
})
);
// Create a meter
const meter = meterProvider.getMeter("metrics-sample");
// Create a counter instrument
const counter = meter.createCounter("metric_name");
// Record a measurement
counter.add(10, { key: "value" });
// Wait for the metric to be exported
new Promise((resolve) => {
setTimeout(resolve, 11_000);
});
This exporter can send OpenTelemetry Exponential Histograms to Google Cloud Monitoring. To use
this feature, add a metric View to configure Histogram
instruments to use the
ExponentialHistogram
aggregation:
const {
Aggregation,
InstrumentType,
MeterProvider,
View
} = require("@opentelemetry/sdk-metrics");
const meterProvider = new MeterProvider({
// ...
views: [
// To use ExponentialHistogram aggregation for all Histograms:
new View({
aggregation: Aggregation.ExponentialHistogram(),
instrumentType: InstrumentType.HISTOGRAM,
}),
// Or if you'd only like to target a specific instrument:
new View({
aggregation: Aggregation.ExponentialHistogram(),
instrumentType: InstrumentType.HISTOGRAM,
instrumentName: "http.client.duration",
}),
],
});
For more information on metric Views, see Configure Metric Views.
With the above you should now be able to navigate to the Google Cloud Monitoring UI at: https://console.cloud.google.com/monitoring
FAQs
OpenTelemetry Google Cloud Monitoring Exporter allows the user to send collected metrics to Google Cloud Monitoring.
The npm package rhizo-co-google-cloudopentelemetry-cloud-monitoring-exporter receives a total of 0 weekly downloads. As such, rhizo-co-google-cloudopentelemetry-cloud-monitoring-exporter popularity was classified as not popular.
We found that rhizo-co-google-cloudopentelemetry-cloud-monitoring-exporter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.