@opentelemetry/resource-detector-github
Advanced tools
Comparing version 0.28.2 to 0.29.0
@@ -1,2 +0,2 @@ | ||
import { Detector, Resource } from '@opentelemetry/resources'; | ||
import { DetectorSync, IResource } from '@opentelemetry/resources'; | ||
/** | ||
@@ -12,3 +12,3 @@ * The GitHubDetector can be used to detect GitHub Actions environment variables and returns | ||
*/ | ||
declare class GitHubDetector implements Detector { | ||
declare class GitHubDetector implements DetectorSync { | ||
private _attributes; | ||
@@ -26,8 +26,6 @@ /** | ||
* | ||
* If successful it returns a promise containing a {@link Resource} | ||
* populated with GitHub metadata. Returns a promise containing an | ||
* empty {@link Resource} if the connection fails. | ||
* | ||
* If successful it returns a {@link Resource} populated with GitHub metadata. | ||
* Returns an empty {@link Resource} if the env vars are not present. | ||
*/ | ||
detect(): Promise<Resource>; | ||
detect(): IResource; | ||
} | ||
@@ -34,0 +32,0 @@ export declare const gitHubDetector: GitHubDetector; |
@@ -49,8 +49,6 @@ "use strict"; | ||
* | ||
* If successful it returns a promise containing a {@link Resource} | ||
* populated with GitHub metadata. Returns a promise containing an | ||
* empty {@link Resource} if the connection fails. | ||
* | ||
* If successful it returns a {@link Resource} populated with GitHub metadata. | ||
* Returns an empty {@link Resource} if the env vars are not present. | ||
*/ | ||
async detect() { | ||
detect() { | ||
this._attributes = {}; | ||
@@ -57,0 +55,0 @@ this.addAttributeIfExists('github.workflow', process.env.GITHUB_WORKFLOW); |
{ | ||
"name": "@opentelemetry/resource-detector-github", | ||
"version": "0.28.2", | ||
"version": "0.29.0", | ||
"description": "OpenTelemetry SDK resource detector for GitHub", | ||
@@ -57,6 +57,6 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"@opentelemetry/resources": "^1.0.0" | ||
"@opentelemetry/resources": "^1.10.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-github#readme", | ||
"gitHead": "96a87b48934f0afcf1fe637eed6704f35bd8e973" | ||
"gitHead": "0e96b2acdb553b17db7fcae0638443c38b04e968" | ||
} |
@@ -25,5 +25,4 @@ # OpenTelemetry Resource Detector for GitHub Actions | ||
```js | ||
const { gitHubDetector } = require('@opentelemetry/resource-detector-github') | ||
const { gitHubDetector } = require('@opentelemetry/opentelemetry-resource-detector-github') | ||
async function run() { | ||
@@ -30,0 +29,0 @@ // Initialize GitHub Resource Detector |
Sorry, the diff of this file is not supported yet
28489
154
66