
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@yamadayuki/exporter-stackdriver
Advanced tools
OpenCensus Exporter Stackdriver allows user to send collected traces to Stackdriver
OpenCensus Stackdriver Exporter allows the user to send collected traces with OpenCensus Node.js and stats with OpenCensus Core to Stackdriver Cloud Tracing and Stackdriver Monitoring.
The library is in alpha stage and the API is subject to change.
Install OpenCensus Stackdriver Exporter with:
npm install @yamadayuki/nodejs
npm install @yamadayuki/exporter-stackdriver
To use Stackdriver as your exporter, make sure you have enabled Stackdriver Tracing on Google Cloud Platform. Enable your Application Default Credentials for authentication with:
export GOOGLE_APPLICATION_CREDENTIALS=path/to/your/credential.json
Create and register the exporter on your application and pass your Project ID.
For Javascript:
const tracing = require("@yamadayuki/nodejs");
const { StackdriverTraceExporter } = require("@yamadayuki/exporter-stackdriver");
// Add your project id to the Stackdriver options
const exporter = new StackdriverTraceExporter({ projectId: "your-project-id" });
tracing.registerExporter(exporter).start();
Similarly for TypeScript:
import * as tracing from "@yamadayuki/nodejs";
import { StackdriverTraceExporter } from "@yamadayuki/exporter-stackdriver";
// Add your project id to the Stackdriver options
const exporter = new StackdriverTraceExporter({ projectId: "your-project-id" });
Now, register the exporter and start tracing.
tracing.start({ exporter: exporter });
or
tracing.registerExporter(exporter).start();
Viewing your traces:
With the above you should now be able to navigate to the Stackdriver UI at: https://console.cloud.google.com/traces/traces
Install OpenCensus Stackdriver Exporter with:
npm install @yamadayuki/core
npm install @yamadayuki/exporter-stackdriver
To use Stackdriver as your exporter, make sure you have enabled Stackdriver Monitoring on Google Cloud Platform. Enable your Application Default Credentials for authentication with:
export GOOGLE_APPLICATION_CREDENTIALS=path/to/your/credential.json
Create and register the exporter on your application.
For Javascript:
const { globalStats } = require("@yamadayuki/core");
const { StackdriverStatsExporter } = require("@yamadayuki/exporter-stackdriver");
// Add your project id to the Stackdriver options
const exporter = new StackdriverStatsExporter({ projectId: "your-project-id" });
// Pass the created exporter to Stats
globalStats.registerExporter(exporter);
Similarly for TypeScript:
import { globalStats } from "@yamadayuki/core";
import { StackdriverStatsExporter } from "@yamadayuki/exporter-stackdriver";
// Add your project id to the Stackdriver options
const exporter = new StackdriverStatsExporter({ projectId: "your-project-id" });
// Pass the created exporter to Stats
globalStats.registerExporter(exporter);
Viewing your metrics:
With the above you should now be able to navigate to the Stackdriver UI at: https://console.cloud.google.com/monitoring
FAQs
OpenCensus Exporter Stackdriver allows user to send collected traces to Stackdriver
The npm package @yamadayuki/exporter-stackdriver receives a total of 0 weekly downloads. As such, @yamadayuki/exporter-stackdriver popularity was classified as not popular.
We found that @yamadayuki/exporter-stackdriver 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.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.