From a9cc4eec0a78d13199f20a4cd7b98d6e74fe799f Mon Sep 17 00:00:00 2001 From: Marley <55280588+marleypowell@users.noreply.github.com> Date: Fri, 5 Apr 2024 09:01:45 +0100 Subject: [PATCH 1/2] Update payment.md code sample to `require` `./index.js` The description paragraph mentions: > It then requires your app at ./index.js to start it up once the SDK is initialized. This seems to be missing from the code sample. --- content/en/docs/demo/services/payment.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/en/docs/demo/services/payment.md b/content/en/docs/demo/services/payment.md index 3fbf0170c16d..1e102fcbf87c 100644 --- a/content/en/docs/demo/services/payment.md +++ b/content/en/docs/demo/services/payment.md @@ -81,6 +81,8 @@ const sdk = new opentelemetry.NodeSDK({ }); sdk.start(); + +require('./index.js'); ``` You can then use `opentelemetry.js` to start your app. This can be done in the From 987d25197b7b82581ce3dad3fe82f7d81569b02a Mon Sep 17 00:00:00 2001 From: Marley Date: Thu, 13 Jun 2024 08:39:42 +0100 Subject: [PATCH 2/2] Update payment.md --- content/en/docs/demo/services/payment.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/en/docs/demo/services/payment.md b/content/en/docs/demo/services/payment.md index 1e102fcbf87c..5c018ceaa3d5 100644 --- a/content/en/docs/demo/services/payment.md +++ b/content/en/docs/demo/services/payment.md @@ -81,15 +81,13 @@ const sdk = new opentelemetry.NodeSDK({ }); sdk.start(); - -require('./index.js'); ``` You can then use `opentelemetry.js` to start your app. This can be done in the `ENTRYPOINT` command for the service's `Dockerfile`. ```dockerfile -ENTRYPOINT [ "node", "./opentelemetry.js" ] +ENTRYPOINT [ "node", "--require", "./opentelemetry.js", "./index.js" ] ``` ## Traces