Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .oxlintrc.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@
"typescript/no-explicit-any": "off"
}
},
{
"files": ["**/integrations/fs/vendored/**/*.ts"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l/m: Just saw this, maybe its best to add this to a list of files and ignore all any for these files, instead of added one block for each vendored block. Otherwise I feel like we have 50 entries of the same block :D

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol jap fair

"rules": {
"typescript/no-explicit-any": "off"
}
},
{
"files": ["**/scenarios/**", "**/rollup-utils/**"],
"rules": {
Expand Down
1 change: 0 additions & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"@opentelemetry/instrumentation": "^0.214.0",
"@opentelemetry/instrumentation-amqplib": "0.61.0",
"@opentelemetry/instrumentation-connect": "0.57.0",
"@opentelemetry/instrumentation-fs": "0.33.0",
"@opentelemetry/instrumentation-graphql": "0.62.0",
"@opentelemetry/instrumentation-hapi": "0.60.0",
"@opentelemetry/instrumentation-http": "0.214.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FsInstrumentation } from '@opentelemetry/instrumentation-fs';
import { FsInstrumentation } from './vendored/instrumentation';
import { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
import { generateInstrumentOnce } from '@sentry/node-core';

Expand Down
143 changes: 143 additions & 0 deletions packages/node/src/integrations/fs/vendored/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* NOTICE from the Sentry authors:
* - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-fs
* - Upstream version: @opentelemetry/instrumentation-fs@0.37.0
*/
/* eslint-disable */

import type { FMember, FPMember } from './types';

export const PROMISE_FUNCTIONS: FPMember[] = [
'access',
'appendFile',
'chmod',
'chown',
'copyFile',
'cp' as FPMember, // added in v16
'lchown',
'link',
'lstat',
'lutimes', // added in v12
'mkdir',
'mkdtemp',
'open',
'opendir', // added in v12
'readdir',
'readFile',
'readlink',
'realpath',
'rename',
'rm', // added in v14
'rmdir',
'stat',
'symlink',
'truncate',
'unlink',
'utimes',
'writeFile',
// 'lchmod', // only implemented on macOS
];

export const CALLBACK_FUNCTIONS: FMember[] = [
'access',
'appendFile',
'chmod',
'chown',
'copyFile',
'cp' as FMember, // added in v16
'exists', // deprecated, inconsistent cb signature, handling separately when patching
'lchown',
'link',
'lstat',
'lutimes', // added in v12
'mkdir',
'mkdtemp',
'open',
'opendir', // added in v12
'readdir',
'readFile',
'readlink',
'realpath',
'realpath.native',
'rename',
'rm', // added in v14
'rmdir',
'stat',
'symlink',
'truncate',
'unlink',
'utimes',
'writeFile',
// 'close', // functions on file descriptor
// 'fchmod', // functions on file descriptor
// 'fchown', // functions on file descriptor
// 'fdatasync', // functions on file descriptor
// 'fstat', // functions on file descriptor
// 'fsync', // functions on file descriptor
// 'ftruncate', // functions on file descriptor
// 'futimes', // functions on file descriptor
// 'lchmod', // only implemented on macOS
// 'read', // functions on file descriptor
// 'readv', // functions on file descriptor
// 'write', // functions on file descriptor
// 'writev', // functions on file descriptor
];

export const SYNC_FUNCTIONS: FMember[] = [
'accessSync',
'appendFileSync',
'chmodSync',
'chownSync',
'copyFileSync',
'cpSync' as FMember, // added in v16
'existsSync',
'lchownSync',
'linkSync',
'lstatSync',
'lutimesSync', // added in v12
'mkdirSync',
'mkdtempSync',
'opendirSync', // added in v12
'openSync',
'readdirSync',
'readFileSync',
'readlinkSync',
'realpathSync',
'realpathSync.native',
'renameSync',
'rmdirSync',
'rmSync', // added in v14
'statSync',
'symlinkSync',
'truncateSync',
'unlinkSync',
'utimesSync',
'writeFileSync',
// 'closeSync', // functions on file descriptor
// 'fchmodSync', // functions on file descriptor
// 'fchownSync', // functions on file descriptor
// 'fdatasyncSync', // functions on file descriptor
// 'fstatSync', // functions on file descriptor
// 'fsyncSync', // functions on file descriptor
// 'ftruncateSync', // functions on file descriptor
// 'futimesSync', // functions on file descriptor
// 'lchmodSync', // only implemented on macOS
// 'readSync', // functions on file descriptor
// 'readvSync', // functions on file descriptor
// 'writeSync', // functions on file descriptor
// 'writevSync', // functions on file descriptor
];
Loading
Loading