Skip to content

Commit

Permalink
Merge branch 'main' into v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sjvans authored Aug 8, 2024
2 parents ec25ce2 + 68a44e9 commit b7339b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/tracing/okra.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ module.exports = () => {

const { process: _process } = OKRAService.prototype

if (!process.env.NO_LOCATE) {
const NO_LOCATE = process.env.NO_LOCATE || cds.env.requires.telemetry.tracing.no_locate
if (!NO_LOCATE) {
let __location
locate(_process).then(location => {
__location = location
Expand Down
5 changes: 4 additions & 1 deletion lib/tracing/wrap.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
const cds = require('@sap/cds')

const locate = require('./locate')
const trace = require('./trace')

function wrap(fn, options) {
if (!fn.__wrapped) {
// locate the function
if (!options.no_locate && !process.env.NO_LOCATE && !fn.__location) {
const NO_LOCATE = options.no_locate || process.env.NO_LOCATE || cds.env.requires.telemetry.tracing.no_locate
if (!NO_LOCATE && !fn.__location) {
let __location = {}
locate(fn).then(location => {
__location = location
Expand Down

0 comments on commit b7339b3

Please sign in to comment.