-
Notifications
You must be signed in to change notification settings - Fork 419
refactor: Added @smithy/smithy-client send subscriber with AWS Bedrock Middleware
#3864
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
base: main
Are you sure you want to change the base?
Changes from all commits
862ecb4
3321397
bc42729
7dbd716
e478f3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,55 @@ | ||||
| /* | ||||
| * Copyright 2026 New Relic Corporation. All rights reserved. | ||||
| * SPDX-License-Identifier: Apache-2.0 | ||||
| */ | ||||
|
|
||||
| const sendConfig = { | ||||
| path: './aws-sdk/send.js', | ||||
| instrumentations: [ | ||||
| // CJS | ||||
| { | ||||
| channelName: 'nr_send', | ||||
| module: { name: '@smithy/smithy-client', versionRange: '>=4.0.0', filePath: 'dist-cjs/index.js' }, | ||||
| functionQuery: { | ||||
| className: 'Client', | ||||
| methodName: 'send', | ||||
| kind: 'Sync' | ||||
| } | ||||
| }, | ||||
| { | ||||
| channelName: 'nr_send', | ||||
| module: { name: '@smithy/smithy-client', versionRange: '>=1.0.0 <4.0.0', filePath: 'dist-cjs/index.js' }, | ||||
| functionQuery: { | ||||
| className: '_Client', | ||||
| methodName: 'send', | ||||
| kind: 'Sync' | ||||
| } | ||||
| }, | ||||
| // ESM | ||||
| { | ||||
| channelName: 'nr_send', | ||||
| module: { name: '@smithy/smithy-client', versionRange: '>=4.0.0', filePath: 'dist-es/index.js' }, | ||||
| functionQuery: { | ||||
| className: 'Client', | ||||
| methodName: 'send', | ||||
| kind: 'Sync' | ||||
| } | ||||
| }, | ||||
| { | ||||
| channelName: 'nr_send', | ||||
| module: { name: '@smithy/smithy-client', versionRange: '>=1.0.0 <4.0.0', filePath: 'dist-es/index.js' }, | ||||
|
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. is
Contributor
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. Like I said in my PR description,
Contributor
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. Does it do so across all versions of these libraries that we support?
Contributor
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. For
Contributor
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. I'll test more versions with
Contributor
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. According to our tests:
The minimum version of https://npmx.dev/package-code/@aws-sdk/smithy-client/v/3.47.0/package.json#L21-L25
Contributor
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. At least for
Contributor
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. Are you saying that the subscriber implementation only works with
Contributor
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. No, the smithy client subscriber should instrument
Contributor
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. Okay, I can't see any direct dependents of 3.47 that we are concerned with. So maybe this isn't a problem. |
||||
| functionQuery: { | ||||
| className: '_Client', | ||||
| methodName: 'send', | ||||
| kind: 'Sync' | ||||
| } | ||||
| } | ||||
| ] | ||||
| } | ||||
|
|
||||
| module.exports = { | ||||
| '@smithy/smithy-client': | ||||
| [ | ||||
| sendConfig | ||||
| ] | ||||
| } | ||||
Uh oh!
There was an error while loading. Please reload this page.