Skip to content

Commit 2b0ee4c

Browse files
committed
TEST TEST macos binary build OOM
1 parent 644c389 commit 2b0ee4c

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

packages/gateway/src/commands/handleOpenTelemetryConfig.ts

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
BatchSpanProcessor,
44
SpanProcessor,
55
} from '@opentelemetry/sdk-trace-base';
6-
import { getEnvStr, isNode } from '~internal/env';
6+
import { getEnvStr } from '~internal/env';
77
import type { CLIContext } from '..';
88

99
export async function handleOpenTelemetryConfig(
@@ -110,21 +110,6 @@ export async function handleOpenTelemetryConfig(
110110

111111
openTelemetrySetup({
112112
traces: { processors },
113-
resource: await detectResource().catch((err) => {
114-
if (
115-
err &&
116-
typeof err === 'object' &&
117-
'code' in err &&
118-
err.code === 'ERR_MODULE_NOT_FOUND'
119-
) {
120-
ctx.log.warn(
121-
err,
122-
`NodeJS modules necessary for environment detection is missing, please install it to auto-detect the environment`,
123-
);
124-
return undefined;
125-
}
126-
throw err;
127-
}),
128113
contextManager,
129114
});
130115

@@ -136,16 +121,3 @@ export async function handleOpenTelemetryConfig(
136121

137122
return false;
138123
}
139-
140-
async function detectResource() {
141-
if (isNode()) {
142-
// eslint-disable-next-line import/no-extraneous-dependencies -- it's up to the user to install
143-
const { getResourceDetectors } = await import(
144-
'@opentelemetry/auto-instrumentations-node'
145-
);
146-
// eslint-disable-next-line import/no-extraneous-dependencies -- it's up to the user to install
147-
const { detectResources } = await import('@opentelemetry/resources');
148-
return detectResources({ detectors: getResourceDetectors() });
149-
}
150-
return undefined;
151-
}

0 commit comments

Comments
 (0)