From 9543e8b7edac128a54b8c66ddac728a6685afb8a Mon Sep 17 00:00:00 2001 From: sjvans <30337871+sjvans@users.noreply.github.com> Date: Mon, 18 Aug 2025 15:56:56 +0200 Subject: [PATCH 01/12] chore: downport `1.5.2` to `1` (#370) --- .github/workflows/hana.yml | 2 +- .gitignore | 1 + CHANGELOG.md | 6 +++++ jest.config.js | 2 +- lib/tracing/cds.js | 8 +++---- lib/tracing/trace.js | 6 +++-- package.json | 2 +- test/passport.test.js | 49 +++++++++++++++++++++++++------------- 8 files changed, 51 insertions(+), 25 deletions(-) diff --git a/.github/workflows/hana.yml b/.github/workflows/hana.yml index 4ab5195..4d43b9c 100644 --- a/.github/workflows/hana.yml +++ b/.github/workflows/hana.yml @@ -1,4 +1,4 @@ -name: CI +name: HANA permissions: contents: read diff --git a/.gitignore b/.gitignore index 0fd6948..99e365a 100644 --- a/.gitignore +++ b/.gitignore @@ -140,3 +140,4 @@ package-lock.json test/msg-box test/bookshop/gen +test/bookshop/.cdsrc.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 64dd9b6..8bcb59c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). The format is based on [Keep a Changelog](http://keepachangelog.com/). +## Version 1.5.2 - 2025-08-18 + +### Fixed + +- SAP Passport propagation with `cds.requires.telemetry.tracing._hana_prom = true` + ## Version 1.5.1 - 2025-08-11 ### Fixed diff --git a/jest.config.js b/jest.config.js index 9ca04dd..70fb6cd 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,7 +5,7 @@ const config = { if (process.env.CI && process.env.HANA_DRIVER) { config.testTimeout *= 10 - config.testMatch = ['**/tracing-attributes.test.js'] + config.testMatch = ['**/tracing-attributes.test.js', '**/passport.test.js'] if (process.env.HANA_PROM) process.env.cds_requires_telemetry_tracing = JSON.stringify({ _hana_prom: process.env.HANA_PROM === 'true' }) diff --git a/lib/tracing/cds.js b/lib/tracing/cds.js index 934e833..c676627 100644 --- a/lib/tracing/cds.js +++ b/lib/tracing/cds.js @@ -14,14 +14,14 @@ function _wrapHandler(handler) { }) } -const _wrapStmt = (stmt, impl, sql) => { +const _wrapStmt = (stmt, impl, sql, dbc) => { for (const fn of ['run', 'get', 'all', 'stream', 'runBatch']) { if (!stmt[fn]) continue const it = stmt[fn] stmt[fn] = wrap(it, { no_locate: true, wrapper: function () { - return trace(`${impl} - stmt.${fn} ${sql}`, it, this, arguments, { sql, fn, kind: SpanKind.CLIENT }) + return trace(`${impl} - stmt.${fn} ${sql}`, it, this, arguments, { sql, dbc, fn, kind: SpanKind.CLIENT }) } }) } @@ -131,8 +131,8 @@ module.exports = () => { fn: 'prepare', kind: SpanKind.CLIENT }) - if (stmt instanceof Promise) return stmt.then(stmt => _wrapStmt(stmt, impl, sql)) - return _wrapStmt(stmt, impl, sql) + if (stmt instanceof Promise) return stmt.then(stmt => _wrapStmt(stmt, impl, sql, this.dbc)) + return _wrapStmt(stmt, impl, sql, this.dbc) } }) dbService.prototype.exec = wrap(_exec, { diff --git a/lib/tracing/trace.js b/lib/tracing/trace.js index fed83d5..48e6054 100644 --- a/lib/tracing/trace.js +++ b/lib/tracing/trace.js @@ -321,7 +321,9 @@ function trace(req, fn, that, args, opts = {}) { if (span.constructor.name === 'NonRecordingSpan') return fn.apply(that, args) // SAP Passport - if (process.env.SAP_PASSPORT && that.dbc?.set) { + // REVISIT: fallback for _hana_prom = false + const dbc = opts.dbc || name.startsWith('@cap-js/hana') && that.dbc + if (process.env.SAP_PASSPORT && dbc?.set) { const { spanId, traceId } = span.spanContext() // REVISIT: @sap/dsrpassport uses '0226' for VARPARTOFFSET // prettier-ignore @@ -346,7 +348,7 @@ function trace(req, fn, that, args, opts = {}) { /* VARPARTOFFSET */ '0000' }${ /* EYECATCHER */ '2A54482A'}` LOG._debug && LOG.debug('Setting SAP Passport:', passport) - that.dbc.set({ SAP_PASSPORT: passport }) + dbc.set({ SAP_PASSPORT: passport }) } const _on_success = res => { diff --git a/package.json b/package.json index ed82113..ef38eef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cap-js/telemetry", - "version": "1.5.1", + "version": "1.5.2", "description": "CDS plugin providing observability features, incl. automatic OpenTelemetry instrumentation.", "repository": { "type": "git", diff --git a/test/passport.test.js b/test/passport.test.js index c0a7873..652d564 100644 --- a/test/passport.test.js +++ b/test/passport.test.js @@ -2,37 +2,54 @@ process.env.SAP_PASSPORT = 'true' const cds = require('@sap/cds') const { expect, GET } = cds.test().in(__dirname + '/bookshop') -const log = cds.test.log() describe('SAP Passport', () => { - let _session_vars, _count + if (cds.env.requires.db.kind === 'sqlite') return test.skip('n/a for SQLite', () => {}) - cds.on('connect', srv => { - if (srv.options.kind === 'sqlite') { - const { acquire } = srv - srv.acquire = async function () { + const admin = { auth: { username: 'alice' } } + + cds.on('connect', async service => { + if (service.kind === 'hana') { + const { acquire } = service + service.acquire = async function () { const dbc = await acquire.apply(this, arguments) - dbc.set ??= o => { - _session_vars = Object.assign(_session_vars || {}, o) - _count++ + if (!dbc._native.set._patched) { + const { set } = dbc._native + dbc._native.set = function (obj) { + if ('SAP_PASSPORT' in obj) { + _passports.push(obj.SAP_PASSPORT) + _count++ + } + return set.apply(this, arguments) + } + dbc._native.set._patched = true } return dbc } } }) - const admin = { auth: { username: 'alice' } } - - beforeEach(log.clear) + let _passports, _count beforeEach(() => { - _session_vars = undefined + _passports = [] _count = 0 }) - test('gets set', async () => { - const { status } = await GET('/odata/v4/admin/Books', admin) + test('gets set once for simple queries', async () => { + const { status } = await GET('/odata/v4/admin/Books?$select=ID,title', admin) expect(status).to.equal(200) - expect(_session_vars).to.containSubset({ SAP_PASSPORT: s => s.match(/^2A54482A/) }) expect(_count).to.equal(2) + expect(_passports[0]).to.equal('') //> the reset + expect(_passports[1]).to.match(/^2A54482A/) + }) + + test('gets set twice for prepared statements', async () => { + const { status } = await GET("/odata/v4/admin/Books?$select=ID,title&$filter=title eq 'hurz'", admin) + expect(status).to.equal(200) + expect(_count).to.equal(3) + expect(_passports[0]).to.equal('') //> the reset + expect(_passports[1]).to.match(/^2A54482A/) + expect(_passports[2]).to.match(/^2A54482A/) + expect(_passports[1]).to.not.equal(_passports[2]) //> different for prepare and execute }) }) From 7e575f4f378e619f3afd99d13ed79944daafc23d Mon Sep 17 00:00:00 2001 From: sjvans <30337871+sjvans@users.noreply.github.com> Date: Fri, 10 Oct 2025 22:31:36 +0200 Subject: [PATCH 02/12] default to SpanKind.SERVER --- lib/tracing/trace.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tracing/trace.js b/lib/tracing/trace.js index 48e6054..5a2637b 100644 --- a/lib/tracing/trace.js +++ b/lib/tracing/trace.js @@ -251,7 +251,8 @@ function trace(req, fn, that, args, opts = {}) { let kind = opts.kind if (kind == null) { - kind = SpanKind.INTERNAL //> default + // kind = SpanKind.INTERNAL //> default + kind = SpanKind.SERVER if (that instanceof cds.RemoteService) kind = SpanKind.CLIENT else if (that instanceof cds.MessagingService) { From 4c0fdf0a57d69d41a47dd49c05ed72fdeec1ff4f Mon Sep 17 00:00:00 2001 From: D050513 Date: Fri, 10 Oct 2025 22:55:26 +0200 Subject: [PATCH 03/12] cds.requires.telemetry.resource --- lib/utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/utils.js b/lib/utils.js index 0c6f983..cfeef13 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -64,6 +64,8 @@ function getResource() { attributes['sap.cf.process.type'] = VCAP_APPLICATION.process_type } + if (cds.env.requires.telemetry?.resource) Object.assign(attributes, cds.env.requires.telemetry.resource) + return new Resource(attributes) } From d15b7e55a73ef3b36ab5aabf93748fd97edf8f26 Mon Sep 17 00:00:00 2001 From: D050513 Date: Mon, 13 Oct 2025 19:38:18 +0200 Subject: [PATCH 04/12] HACK: do not export @opentelemetry/instrumentation-hdb spans if xotel agent is used --- lib/tracing/index.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/tracing/index.js b/lib/tracing/index.js index 7d735dd..e18d9c8 100644 --- a/lib/tracing/index.js +++ b/lib/tracing/index.js @@ -2,7 +2,7 @@ const cds = require('@sap/cds') const LOG = cds.log('telemetry') const { trace } = require('@opentelemetry/api') -const { getEnv, getEnvWithoutDefaults } = require('@opentelemetry/core') +const { ExportResultCode, getEnv, getEnvWithoutDefaults } = require('@opentelemetry/core') const { Resource } = require('@opentelemetry/resources') const { BatchSpanProcessor, SimpleSpanProcessor, SamplingDecision } = require('@opentelemetry/sdk-trace-base') const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node') @@ -156,6 +156,17 @@ module.exports = resource => { LOG._info && LOG.info('Dynatrace OneAgent detected, disabling trace exporter') } else { const exporter = _getExporter() + + // HACK: do not export @opentelemetry/instrumentation-hdb spans if xotel agent is used + if (process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) { + const { export: _export } = exporter + exporter.export = function (spans, resultCallback) { + const _spans = spans.filter(s => s.instrumentationLibrary?.name !== '@opentelemetry/instrumentation-hdb') + if (!_spans.length) return resultCallback({ code: ExportResultCode.SUCCESS }) + return _export.call(this, spans, resultCallback) + } + } + const processorConfig = cds.env.requires.telemetry.tracing.processor?.config || {} const processor = process.env.NODE_ENV === 'production' From 22cabec4468a69024fd1ccf794e1bafa908245c6 Mon Sep 17 00:00:00 2001 From: D050513 Date: Mon, 13 Oct 2025 22:11:28 +0200 Subject: [PATCH 05/12] process.env.CALM --- lib/tracing/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tracing/index.js b/lib/tracing/index.js index e18d9c8..571eb50 100644 --- a/lib/tracing/index.js +++ b/lib/tracing/index.js @@ -158,7 +158,9 @@ module.exports = resource => { const exporter = _getExporter() // HACK: do not export @opentelemetry/instrumentation-hdb spans if xotel agent is used - if (process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) { + LOG.info('process.execArgv:', process.execArgv) + LOG.info('@sap/xotel-agent-ext-js:', process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) + if (process.env.CALM || process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) { const { export: _export } = exporter exporter.export = function (spans, resultCallback) { const _spans = spans.filter(s => s.instrumentationLibrary?.name !== '@opentelemetry/instrumentation-hdb') From a5e777dd25608ba3b0a4dd081a74cf38613aaaa1 Mon Sep 17 00:00:00 2001 From: D050513 Date: Mon, 13 Oct 2025 22:12:27 +0200 Subject: [PATCH 06/12] process.env.SAP_CALM_SERVICE_NAME --- lib/tracing/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tracing/index.js b/lib/tracing/index.js index 571eb50..4343475 100644 --- a/lib/tracing/index.js +++ b/lib/tracing/index.js @@ -160,7 +160,7 @@ module.exports = resource => { // HACK: do not export @opentelemetry/instrumentation-hdb spans if xotel agent is used LOG.info('process.execArgv:', process.execArgv) LOG.info('@sap/xotel-agent-ext-js:', process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) - if (process.env.CALM || process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) { + if (process.env.SAP_CALM_SERVICE_NAME || process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) { const { export: _export } = exporter exporter.export = function (spans, resultCallback) { const _spans = spans.filter(s => s.instrumentationLibrary?.name !== '@opentelemetry/instrumentation-hdb') From 4976d268ed6c9310c5e07d9e56c2179171efedff Mon Sep 17 00:00:00 2001 From: D050513 Date: Mon, 13 Oct 2025 23:22:04 +0200 Subject: [PATCH 07/12] pass _spans --- lib/tracing/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tracing/index.js b/lib/tracing/index.js index 4343475..eb3ce17 100644 --- a/lib/tracing/index.js +++ b/lib/tracing/index.js @@ -165,7 +165,7 @@ module.exports = resource => { exporter.export = function (spans, resultCallback) { const _spans = spans.filter(s => s.instrumentationLibrary?.name !== '@opentelemetry/instrumentation-hdb') if (!_spans.length) return resultCallback({ code: ExportResultCode.SUCCESS }) - return _export.call(this, spans, resultCallback) + return _export.call(this, _spans, resultCallback) } } From 81fc9ce2ec4c5c775acb3f43e232a20917314cf3 Mon Sep 17 00:00:00 2001 From: D050513 Date: Tue, 14 Oct 2025 09:47:59 +0200 Subject: [PATCH 08/12] log --- lib/tracing/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/tracing/index.js b/lib/tracing/index.js index eb3ce17..b648fbe 100644 --- a/lib/tracing/index.js +++ b/lib/tracing/index.js @@ -158,9 +158,8 @@ module.exports = resource => { const exporter = _getExporter() // HACK: do not export @opentelemetry/instrumentation-hdb spans if xotel agent is used - LOG.info('process.execArgv:', process.execArgv) - LOG.info('@sap/xotel-agent-ext-js:', process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) - if (process.env.SAP_CALM_SERVICE_NAME || process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) { + if (process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) { + LOG._info && LOG.info('Adding export filter for @opentelemetry/instrumentation-hdb spans') const { export: _export } = exporter exporter.export = function (spans, resultCallback) { const _spans = spans.filter(s => s.instrumentationLibrary?.name !== '@opentelemetry/instrumentation-hdb') From 4620b212fa9490a0463fe26b9e1801d7fdf2be07 Mon Sep 17 00:00:00 2001 From: D050513 Date: Wed, 15 Oct 2025 18:00:59 +0200 Subject: [PATCH 09/12] remove parentSpanId from http spans if there is no traceparent header --- lib/tracing/index.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/tracing/index.js b/lib/tracing/index.js index b648fbe..07db3f1 100644 --- a/lib/tracing/index.js +++ b/lib/tracing/index.js @@ -157,13 +157,16 @@ module.exports = resource => { } else { const exporter = _getExporter() - // HACK: do not export @opentelemetry/instrumentation-hdb spans if xotel agent is used + // HACKS: + // - do not export @opentelemetry/instrumentation-hdb spans if xotel agent is used + // - remove parentSpanId from http spans if there is no traceparent header if (process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) { - LOG._info && LOG.info('Adding export filter for @opentelemetry/instrumentation-hdb spans') + LOG._info && LOG.info('Adding export mods for running with @sap/xotel-agent-ext-js') const { export: _export } = exporter exporter.export = function (spans, resultCallback) { const _spans = spans.filter(s => s.instrumentationLibrary?.name !== '@opentelemetry/instrumentation-hdb') if (!_spans.length) return resultCallback({ code: ExportResultCode.SUCCESS }) + for (const _span of _spans) if (_should_be_orphan(_span)) _make_orphan(_span) return _export.call(this, _spans, resultCallback) } } @@ -193,3 +196,12 @@ module.exports = resource => { return tracerProvider } + +const _should_be_orphan = span => + span.instrumentationLibrary?.name === '@opentelemetry/instrumentation-http' && + span.parentSpanId && + !span.attributes['http.request.header.traceparent'] +const _make_orphan = span => { + LOG._debug && LOG.debug('Removing parentSpanId from span:', span) + span.parentSpanId = undefined +} From 0e0e6e1fa679007e637c56663271cb5922d489db Mon Sep 17 00:00:00 2001 From: sjvans <30337871+sjvans@users.noreply.github.com> Date: Mon, 27 Oct 2025 13:30:33 +0100 Subject: [PATCH 10/12] fix: handle pre-initialized LoggerProvider (#383) --- CHANGELOG.md | 6 ++++++ lib/logging/index.js | 3 +-- package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de549ce..b9f0b08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). The format is based on [Keep a Changelog](http://keepachangelog.com/). +## Version 1.5.4 - 2025-10-27 + +### Fixed + +- Handle pre-initialized `LoggerProvider` + ## Version 1.5.3 - 2025-09-01 ### Fixed diff --git a/lib/logging/index.js b/lib/logging/index.js index 6d77d76..f7e204c 100644 --- a/lib/logging/index.js +++ b/lib/logging/index.js @@ -77,12 +77,11 @@ module.exports = resource => { const { LoggerProvider, BatchLogRecordProcessor, SimpleLogRecordProcessor } = require('@opentelemetry/sdk-logs') let loggerProvider = logs.getLoggerProvider() - if (!loggerProvider.getDelegateLogger()) { + if (loggerProvider.constructor.name === 'ProxyLoggerProvider') { loggerProvider = new LoggerProvider({ resource }) logs.setGlobalLoggerProvider(loggerProvider) } else { LOG._warn && LOG.warn('LoggerProvider already initialized by a different module. It will be used as is.') - loggerProvider = loggerProvider.getDelegateLogger() } const exporter = _getExporter() diff --git a/package.json b/package.json index 2c79504..c7a77ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cap-js/telemetry", - "version": "1.5.3", + "version": "1.5.4", "description": "CDS plugin providing observability features, incl. automatic OpenTelemetry instrumentation.", "repository": { "type": "git", From 032a05a3199255a956179e659855b50bfc071e07 Mon Sep 17 00:00:00 2001 From: D050513 Date: Thu, 13 Nov 2025 10:24:29 +0100 Subject: [PATCH 11/12] cds.requires.telemetry._with_xotel + switch SERVER spans back to INTERNAL spans --- lib/tracing/index.js | 23 +++++++++++++++++------ lib/tracing/trace.js | 9 +++++++-- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/lib/tracing/index.js b/lib/tracing/index.js index 07db3f1..02df258 100644 --- a/lib/tracing/index.js +++ b/lib/tracing/index.js @@ -1,7 +1,7 @@ const cds = require('@sap/cds') const LOG = cds.log('telemetry') -const { trace } = require('@opentelemetry/api') +const { trace, SpanKind } = require('@opentelemetry/api') const { ExportResultCode, getEnv, getEnvWithoutDefaults } = require('@opentelemetry/core') const { Resource } = require('@opentelemetry/resources') const { BatchSpanProcessor, SimpleSpanProcessor, SamplingDecision } = require('@opentelemetry/sdk-trace-base') @@ -157,16 +157,20 @@ module.exports = resource => { } else { const exporter = _getExporter() - // HACKS: - // - do not export @opentelemetry/instrumentation-hdb spans if xotel agent is used + // unofficial hacks for running with xotel agent: + // - do not export @opentelemetry/instrumentation-hdb spans // - remove parentSpanId from http spans if there is no traceparent header - if (process.execArgv?.some(a => a.match(/@sap\/xotel-agent-ext-js/))) { + // - switch SERVER spans back to INTERNAL spans + if (cds.env.requires.telemetry._with_xotel) { LOG._info && LOG.info('Adding export mods for running with @sap/xotel-agent-ext-js') const { export: _export } = exporter exporter.export = function (spans, resultCallback) { const _spans = spans.filter(s => s.instrumentationLibrary?.name !== '@opentelemetry/instrumentation-hdb') if (!_spans.length) return resultCallback({ code: ExportResultCode.SUCCESS }) - for (const _span of _spans) if (_should_be_orphan(_span)) _make_orphan(_span) + for (const _span of _spans) { + if (_should_be_orphan(_span)) _make_orphan(_span) + if (_should_be_internal(_span)) _make_internal(_span) + } return _export.call(this, _spans, resultCallback) } } @@ -202,6 +206,13 @@ const _should_be_orphan = span => span.parentSpanId && !span.attributes['http.request.header.traceparent'] const _make_orphan = span => { - LOG._debug && LOG.debug('Removing parentSpanId from span:', span) + LOG._debug && LOG.debug('Removing parentSpanId from span:', span.spanContext().spanId) span.parentSpanId = undefined } + +const _should_be_internal = span => + span.kind === SpanKind.SERVER && span.instrumentationLibrary?.name !== '@opentelemetry/instrumentation-http' +const _make_internal = span => { + LOG._debug && LOG.debug('Switching span kind back to INTERNAL for span:', span.spanContext().spanId) + span.kind = SpanKind.INTERNAL +} diff --git a/lib/tracing/trace.js b/lib/tracing/trace.js index 0f4f5c4..5347a30 100644 --- a/lib/tracing/trace.js +++ b/lib/tracing/trace.js @@ -251,8 +251,13 @@ function trace(req, fn, that, args, opts = {}) { let kind = opts.kind if (kind == null) { - // kind = SpanKind.INTERNAL //> default - kind = SpanKind.SERVER + kind = SpanKind.INTERNAL //> default + + // unofficial hack for running with xotel agent: default to SERVER spans + if (cds.env.requires.telemetry._with_xotel) { + LOG._debug && LOG.debug('Temporaily switching span kind to SERVER to circumvent no sampling decision by xotel') + kind = SpanKind.SERVER + } if (that instanceof cds.RemoteService) kind = SpanKind.CLIENT else if (that instanceof cds.MessagingService) { From 98d517013cf0e8d0e425a999a37ca6e6b8c9ceaf Mon Sep 17 00:00:00 2001 From: sjvans <30337871+sjvans@users.noreply.github.com> Date: Thu, 13 Nov 2025 11:39:39 +0100 Subject: [PATCH 12/12] Update lib/utils.js --- lib/utils.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index b955c19..f6a9a31 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -72,8 +72,6 @@ function getResource() { attributes['sap.cf.process.type'] = VCAP_APPLICATION.process_type } - if (cds.env.requires.telemetry?.resource) Object.assign(attributes, cds.env.requires.telemetry.resource) - return new Resource(attributes) }