Skip to content

Commit

Permalink
Merge pull request #11 from bugsnag/motti/fix-payment-api-key-env
Browse files Browse the repository at this point in the history
fix: Payment api key env var
  • Loading branch information
mottibec authored Dec 19, 2024
2 parents 3975210 + 99dc946 commit 5ecb0af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/flagd/demo.flagd.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"on": true,
"off": false
},
"defaultVariant": "on"
"defaultVariant": "off"
},
"adServiceManualGc": {
"description": "Triggers full manual garbage collections in the ad service",
Expand Down
5 changes: 3 additions & 2 deletions src/paymentservice/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const { trace, context } = require('@opentelemetry/api');
const Bugsnag = require('@bugsnag/js');

Bugsnag.start({
apiKey: process.env.PAYMENT_SERVICE_BUGSNAG_API_KEY,
apiKey: process.env.BUGSNAG_API_KEY,
appVersion: process.env.BUGSNAG_APP_VERSION,
onError: function (event) {
const spanContext = trace.getSpanContext(context.active());
event.addMetadata("correlation", {
Expand All @@ -37,7 +38,7 @@ async function chargeServiceHandler(call, callback) {
} catch (err) {
logger.warn({ err })
Bugsnag.notify(err);

span.recordException(err)
span.setStatus({ code: opentelemetry.SpanStatusCode.ERROR })

Expand Down

0 comments on commit 5ecb0af

Please sign in to comment.