
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@opentelemetry/resource-detector-github
Advanced tools
OpenTelemetry SDK resource detector for GitHub
Resource detector for GitHub Actions.
Detects GITHUB_*
environment variables specified here and adds as attributes on a resource.
This is useful for collecting telemetry in GitHub Actions-powered CI/CD workflows.
The OpenTelemetry Resource is an immutable representation of the entity producing telemetry. For example, a process producing telemetry that is running in a container on Kubernetes has a Pod name, it is in a namespace and possibly is part of a Deployment which also has a name. All three of these attributes can be included in the Resource
.
Compatible with OpenTelemetry JS API and SDK 1.0+
.
npm install --save @opentelemetry/resource-detector-github
const { gitHubDetector } = require('@opentelemetry/resource-detector-github')
async function run() {
// Initialize GitHub Resource Detector
const resource = await gitHubDetector.detect();
};
run()
Resource Attribute | Description |
---|---|
github.actor | Value of Process Environment Variable GITHUB_ACTOR |
github.base_ref | Value of Process Environment Variable GITHUB_BASE_REF |
github.head_ref | Value of Process Environment Variable GITHUB_HEAD_REF |
github.ref | Value of Process Environment Variable GITHUB_REF |
github.run_id | Value of Process Environment Variable GITHUB_RUN_ID |
github.run_number | Value of Process Environment Variable GITHUB_RUN_NUMBER |
github.sha | Value of Process Environment Variable GITHUB_SHA |
github.workflow | Value of Process Environment Variable GITHUB_WORKFLOW |
Apache 2.0 - See LICENSE for more information.
FAQs
OpenTelemetry SDK resource detector for GitHub
The npm package @opentelemetry/resource-detector-github receives a total of 24,529 weekly downloads. As such, @opentelemetry/resource-detector-github popularity was classified as popular.
We found that @opentelemetry/resource-detector-github demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.