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

@opentelemetry/resource-detector-github

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/resource-detector-github

OpenTelemetry SDK resource detector for GitHub

  • 0.29.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

OpenTelemetry Resource Detector for GitHub Actions

NPM Published Version Apache License

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+.

Installation

npm install --save @opentelemetry/resource-detector-github

Usage

const { gitHubDetector } = require('@opentelemetry/resource-detector-github')

async function run() {
  // Initialize GitHub Resource Detector
  const resource = await gitHubDetector.detect();
};

run()

Available detectors

GitHub Detector

Resource AttributeDescription
github.actorValue of Process Environment Variable GITHUB_ACTOR
github.base_refValue of Process Environment Variable GITHUB_BASE_REF
github.head_refValue of Process Environment Variable GITHUB_HEAD_REF
github.refValue of Process Environment Variable GITHUB_REF
github.run_idValue of Process Environment Variable GITHUB_RUN_ID
github.run_numberValue of Process Environment Variable GITHUB_RUN_NUMBER
github.shaValue of Process Environment Variable GITHUB_SHA
github.workflowValue of Process Environment Variable GITHUB_WORKFLOW

License

Apache 2.0 - See LICENSE for more information.

Keywords

FAQs

Package last updated on 05 Aug 2024

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