-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: Remove Otel from fsIntegration
#21654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| import { defineIntegration } from '@sentry/core'; | ||
| import { generateInstrumentOnce } from '@sentry/node-core'; | ||
| import { FsInstrumentation } from './vendored/instrumentation'; | ||
| import { enableFsInstrumentation } from './vendored/instrumentation'; | ||
|
|
||
| const INTEGRATION_NAME = 'FileSystem'; | ||
|
|
||
| let _isEnabled = false; | ||
|
|
||
| /** | ||
| * This integration will create spans for `fs` API operations, like reading and writing files. | ||
| * | ||
|
|
@@ -16,6 +17,11 @@ const INTEGRATION_NAME = 'FileSystem'; | |
| export const fsIntegration = defineIntegration( | ||
| ( | ||
| options: { | ||
| /** | ||
| * Whether to enable the plugin. | ||
| * @default true | ||
| */ | ||
| enabled?: boolean; | ||
| /** | ||
| * Setting this option to `true` will include any filepath arguments from your `fs` API calls as span attributes. | ||
| * | ||
|
|
@@ -34,14 +40,10 @@ export const fsIntegration = defineIntegration( | |
| return { | ||
| name: INTEGRATION_NAME, | ||
| setupOnce() { | ||
| generateInstrumentOnce( | ||
| INTEGRATION_NAME, | ||
| () => | ||
| new FsInstrumentation({ | ||
| recordFilePaths: options.recordFilePaths, | ||
| recordErrorMessagesAsSpanAttributes: options.recordErrorMessagesAsSpanAttributes, | ||
| }), | ||
| )(); | ||
| if (options.enabled === false) return; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. m: Do we need to expose an
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, because I removed |
||
| if (_isEnabled) return; | ||
| _isEnabled = true; | ||
|
timfish marked this conversation as resolved.
Outdated
|
||
| enableFsInstrumentation(options); | ||
| }, | ||
| }; | ||
| }, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.