-
Notifications
You must be signed in to change notification settings - Fork 804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: process resource detector #1531
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #1531 +/- ##
==========================================
+ Coverage 93.28% 93.30% +0.02%
==========================================
Files 153 154 +1
Lines 4750 4768 +18
Branches 950 958 +8
==========================================
+ Hits 4431 4449 +18
Misses 319 319
|
vmarchaud
reviewed
Sep 14, 2020
packages/opentelemetry-resources/src/platform/node/detectors/ProcessDetector.ts
Show resolved
Hide resolved
mihirsoni
requested review from
dyladan,
legendecas,
markwolff,
mayurkale22,
mwear,
naseemkullah,
obecny and
OlivierAlbertini
as code owners
September 14, 2020 18:39
dyladan
reviewed
Sep 14, 2020
packages/opentelemetry-resources/src/platform/node/detectors/ProcessDetector.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-resources/src/platform/node/detectors/ProcessDetector.ts
Show resolved
Hide resolved
packages/opentelemetry-resources/src/platform/node/detectors/ProcessDetector.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-resources/src/platform/node/detectors/ProcessDetector.ts
Outdated
Show resolved
Hide resolved
obecny
reviewed
Sep 16, 2020
packages/opentelemetry-resources/src/platform/node/detectors/ProcessDetector.ts
Show resolved
Hide resolved
packages/opentelemetry-resources/src/platform/node/detectors/ProcessDetector.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-resources/test/detectors/ProcessDetector.test.ts
Outdated
Show resolved
Hide resolved
mihirsoni
force-pushed
the
issue-1261
branch
from
September 21, 2020 06:46
16dc973
to
3f51629
Compare
dyladan
approved these changes
Sep 21, 2020
vmarchaud
approved these changes
Sep 21, 2020
markwolff
approved these changes
Sep 21, 2020
obecny
approved these changes
Sep 21, 2020
pichlermarc
pushed a commit
to dynatrace-oss-contrib/opentelemetry-js
that referenced
this pull request
Dec 15, 2023
…pen-telemetry#1772) * feat(auto-instrumentations-node): Expose getting resource detectors The auto instrumentation package provides users with a very easy way to instrument their application, either from the commandline or programatically. Users wishing the configure these instrumentations can also call `getNodeAutoInstrumentations`. This commit also exposes `getResourceDetectorsFromEnv`, so that users configuring or somehow wishing to change the easy to use autoinstrumentation entrypoint can also use the preconfigured resource detectors. Since the autoinstrumentation package sets its exports, this function was previously inaccessible. Usage can look like this: ```js const { getNodeAutoInstrumentations, getResourceDetectorsFromEnv } = require('@opentelemetry/auto-instrumentations-node'); const opentelemetry = require('@opentelemetry/sdk-node'); const sdk = new opentelemetry.NodeSDK({ instrumentations: getNodeAutoInstrumentations({ '@opentelemetry/instrumentation-fs': { enabled: false }, }), resourceDetectors: getResourceDetectorsFromEnv(), }); // use the sdk ``` Workarounds can be found [elsewhere in the opentelemetry repos](https://github.com/open-telemetry/opentelemetry-demo/blob/855bde3588b0fe85e500bec185dc2f311b15f98a/src/paymentservice/opentelemetry.js#L28-L38). These can be fixed once a release is made. Resolves open-telemetry#1531. * style: Align indentation --------- Co-authored-by: Amir Blum <amirgiraffe@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
Adds process resource detectors.
Short description of the changes
This PR will add a new resource detectors for the process.
Resources are derived from following
1234
At least one of
process.executable.name
,process.executable.path
,process.command
, orprocess.command_line
is required.