Skip to content
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

chore: Migrated @newrelic/aws-sdk into agent repo #2161

Merged
merged 554 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
554 commits
Select commit Hold shift + click to select a range
10777dd
Merge pull request #119 from newrelic/release/v4.1.0
garbados Jan 7, 2022
ef15e55
added create release workflow 🎉
bizob2828 Jan 7, 2022
18e33c5
Merge pull request #120 from newrelic/automate-create-release.yml
garbados Jan 7, 2022
5d41dac
pass in npm token to release creation
bizob2828 Jan 10, 2022
eefb199
Fixes nr-hooks version checking circular reference issue.
michaelgoin Jan 13, 2022
c416fbb
Adds noop onRequire hooks to avoid warnings on older Agent versions p…
michaelgoin Jan 13, 2022
7949c24
Fixes issue with NOOP_ON_REQUIRE not being initialized early enough.
michaelgoin Jan 13, 2022
74ca3d3
Merge pull request #122 from michaelgoin/fix-version-checking
michaelgoin Jan 13, 2022
81ccf32
Setting version to v4.1.1.
Jan 13, 2022
2e6877b
Adds auto-generated release notes.
Jan 13, 2022
b2a68ab
Merge pull request #123 from newrelic/release/v4.1.1
michaelgoin Jan 14, 2022
ae346cd
changing gh token to the org level value
bizob2828 Jan 14, 2022
66384d8
Merge pull request #124 from bizob2828/swap-gh-token
bizob2828 Jan 14, 2022
1b5dd7c
Resolves several dev npm audit warnings.
michaelgoin Feb 11, 2022
a194a0e
fix: upgrade newrelic from 8.7.0 to 8.7.1
snyk-bot Feb 13, 2022
8e74a17
Merge pull request #126 from newrelic/snyk-upgrade-809afb2b94040ce2b7…
michaelgoin Feb 14, 2022
f65ba56
Merge pull request #125 from michaelgoin/audit-fix
bizob2828 Feb 15, 2022
88a3ffd
fixed discuss link in README
bizob2828 Feb 17, 2022
ed95e15
Merge pull request #127 from bizob2828/fix-readme
michaelgoin Feb 17, 2022
a358ae5
packages: remove versioned tests
Feb 28, 2022
bfcbfb1
Merge pull request #128 from jordigh/remove-versioned-tests
Feb 28, 2022
cd4862b
Setting version to v4.1.2.
Mar 7, 2022
1695d79
CHANGELOG.md: update for new release
Mar 7, 2022
63807e3
Merge pull request #129 from newrelic/release/v4.1.2
Mar 8, 2022
5722f00
Bump moment from 2.29.1 to 2.29.2
dependabot[bot] Apr 9, 2022
045c0fb
Merge pull request #131 from newrelic/dependabot/npm_and_yarn/moment-…
michaelgoin Apr 11, 2022
ec6798b
Bumps tap to ^16.0.1.
michaelgoin Apr 11, 2022
95c29ec
npm audit fix.
michaelgoin Apr 11, 2022
2867cb2
Merge pull request #132 from michaelgoin/bump-tap
bizob2828 Apr 14, 2022
a06f074
Removes usage of async module.
michaelgoin Apr 14, 2022
c01c4dc
Merge pull request #134 from michaelgoin/remove-async
bizob2828 Apr 18, 2022
2007565
Lowered amount of versions we test for clients running through generi…
michaelgoin Apr 18, 2022
a05e21c
Merge pull request #135 from newrelic/less-externals-versions
bizob2828 Apr 19, 2022
3181234
Bump protobufjs from 6.11.2 to 6.11.3
dependabot[bot] Jun 2, 2022
0a72732
Merge pull request #137 from newrelic/dependabot/npm_and_yarn/protobu…
bizob2828 Jun 3, 2022
3f20eb0
Updates CI to run against Node versions 14-18.
michaelgoin Jul 12, 2022
5aaa9ff
Merge pull request #138 from michaelgoin/ci-node-18
bizob2828 Jul 18, 2022
bb10151
Bump moment from 2.29.2 to 2.29.4
dependabot[bot] Jul 18, 2022
cde2b1e
Merge pull request #139 from newrelic/dependabot/npm_and_yarn/moment-…
bizob2828 Jul 18, 2022
527f7f0
chore: Removed agent version check, anticipating Node 18 support
mrickard Jul 20, 2022
0fd6b0f
chore: Updated test to address linter warning
mrickard Jul 20, 2022
4769860
chore: Added JetBrains settings to .gitignore
mrickard Jul 20, 2022
8422b62
Bumped version and removed now-unused semver dependency
mrickard Jul 20, 2022
0ccf32a
NR peer dependency version updated to >= 8.7.0, and version updated t…
mrickard Jul 21, 2022
7f6a48f
Restoring version number
mrickard Jul 21, 2022
6e94a26
Merge pull request #140 from mrickard/NR-35252/remove-semver-check-fo…
bizob2828 Jul 21, 2022
9634fcd
Dropped Node 12
mrickard Jul 26, 2022
013fe57
Merge pull request #142 from mrickard/NR-35639/drop-node-12
michaelgoin Jul 26, 2022
1e1c5e1
Setting version to v5.0.0.
mrickard Jul 27, 2022
34633be
Adds auto-generated release notes.
mrickard Jul 27, 2022
83f035f
Updated CHANGELOG.md with v5.0 release notes
mrickard Jul 28, 2022
4334094
Merge pull request #143 from newrelic/release/v5.0.0
bizob2828 Jul 28, 2022
c9675ab
add story template for jira linking NEWRELIC-3748
coreyarnold Sep 20, 2022
005769e
remove story issue template NEWRELIC-3748
coreyarnold Sep 22, 2022
c8d6157
remove enhancement issue template NEWRELIC-3748
coreyarnold Sep 22, 2022
08b28b4
Merge pull request #148 from newrelic/coreyarnold-patch-1
Sep 23, 2022
8b08f9d
default dynamodb port to 443 when undefined on endpoint instance
bizob2828 Oct 6, 2022
ce75190
Merge pull request #150 from bizob2828/fix-dynamo-port
bizob2828 Oct 7, 2022
ba04cd9
Setting version to v5.0.1.
jmartin4563 Oct 10, 2022
97966f9
Adds auto-generated release notes.
jmartin4563 Oct 10, 2022
d71cde1
Updated CHANGELOG.md v5.0.1 release notes
jmartin4563 Oct 10, 2022
8cd02a6
Merge pull request #151 from newrelic/release/v5.0.1
jmartin4563 Oct 10, 2022
c081117
Temporarily lock down version of @aws-sdk/client-s3
jmartin4563 Oct 19, 2022
df43909
Merge pull request #152 from jmartin4563/aws-sdk-v3-version-lock
jmartin4563 Oct 19, 2022
2e0e8cb
Update s3-client semver range to skip 3.192.0
jmartin4563 Oct 20, 2022
3c1c2b8
Merge pull request #153 from jmartin4563/unlock-version
jmartin4563 Oct 20, 2022
e08573e
[email protected] broke support for custom endpoints, so stay with 3.193.0
jmartin4563 Oct 24, 2022
8d585e3
Merge pull request #154 from jmartin4563/skip-bad-version
bizob2828 Oct 24, 2022
969d528
Lock down all packages to max v3.193.0
jmartin4563 Oct 24, 2022
d9fc945
Need to keep the dynamo lib tests in sync version wise
jmartin4563 Oct 24, 2022
1737134
Merge pull request #155 from jmartin4563/lock-down-all-packages
jmartin4563 Oct 24, 2022
cca478f
update actions that are using deprecated node 12
bizob2828 Oct 25, 2022
34fa4b4
fixed the troubleshooting link
bizob2828 Oct 26, 2022
eece857
updated repolinter github/script to latest
bizob2828 Oct 26, 2022
84a373e
updated reference to github sdk after bumping github-script to v6
bizob2828 Oct 26, 2022
af54d01
NR-60705 wire up c8 and codecov for coverage collection
jmartin4563 Oct 26, 2022
057f92e
NR-60705 updated header image and badges
jmartin4563 Oct 26, 2022
1f4def1
Merge pull request #156 from bizob2828/update-deprecated-actions
bizob2828 Oct 26, 2022
b1b21a6
NR-60705 formatting fix on c8 config file
jmartin4563 Oct 26, 2022
4c49aee
Merge branch 'main' into NR-60705-codecov
jmartin4563 Oct 26, 2022
a30b514
Merge pull request #157 from jmartin4563/NR-60705-codecov
jmartin4563 Oct 27, 2022
29a2e4a
NEWRELIC-4422: remove usage of __NR_instrumented in tests
Oct 27, 2022
d30c753
NEWRELIC-4422: patch up a test
Oct 27, 2022
8d4ecb7
Merge pull request #158 from jordigh/remove-dunder-nr
Oct 27, 2022
73a371b
updated versions tests to test v3 vesions > 3.194.0 as AWS seems to h…
bizob2828 Nov 4, 2022
f494a52
Merge pull request #159 from bizob2828/remove-failures
bizob2828 Nov 4, 2022
7a6ce53
added defensive code to work around a breaking change in aws sdk mino…
bizob2828 Nov 7, 2022
6e8bff0
Merge pull request #161 from bizob2828/defensive-ddb
bizob2828 Nov 7, 2022
81b17ff
Setting version to v5.0.2.
bizob2828 Nov 7, 2022
0a9ddec
Adds auto-generated release notes.
bizob2828 Nov 7, 2022
bcf4841
changelog tweaks
bizob2828 Nov 7, 2022
324beec
Merge pull request #162 from newrelic/release/v5.0.2
bizob2828 Nov 7, 2022
6213fb5
docs: update slack invite link
coreyarnold Dec 9, 2022
5f5f46f
Merge pull request #163 from newrelic/coreyarnold-patch-1
jmartin4563 Dec 9, 2022
2fe6823
Bump qs from 6.5.2 to 6.5.3
dependabot[bot] Dec 12, 2022
c2d39c0
Merge pull request #164 from newrelic/dependabot/npm_and_yarn/qs-6.5.3
jmartin4563 Dec 12, 2022
6ac296e
NEWRELIC-5683 added lockfile checks/linting to CI workflow
jmartin4563 Dec 20, 2022
55f9f31
NEWRELIC-5683 bump to latest version of agent
jmartin4563 Dec 20, 2022
af4f1f4
Merge pull request #165 from jmartin4563/NEWRELIC-5683-lockfile-lint
bizob2828 Dec 21, 2022
2155ec3
Bump json5 from 2.2.1 to 2.2.2
dependabot[bot] Jan 8, 2023
c54266c
Merge pull request #166 from newrelic/dependabot/npm_and_yarn/json5-2…
bizob2828 Jan 9, 2023
dad896e
Skipping aws-sdk version 3.290.0. This introduced automatic lowercasi…
mrickard Mar 14, 2023
7bd0aa8
Merge pull request #169 from mrickard/NEWRELIC-7497/aws-sdk-3.290.0-b…
bizob2828 Mar 14, 2023
46b99fe
chore: update to newest community plus header
jmartin4563 Mar 13, 2023
8b492fd
Merge pull request #167 from jmartin4563/fix-oss-header
bizob2828 Mar 14, 2023
6dcc7c3
NEWRELIC-7497 updated aws sdk v3 instrumentation to set a x-new-relic…
bizob2828 Mar 14, 2023
7023823
NEWRELIC-7497 updated newrelic dev dep to latest so the versioned tes…
bizob2828 Mar 15, 2023
7fbc951
Merge pull request #171 from bizob2828/fix-symbol-assignment
jmartin4563 Mar 15, 2023
6806ce4
Setting version to v5.0.3.
bizob2828 Mar 15, 2023
ca84ff7
Adds auto-generated release notes.
bizob2828 Mar 15, 2023
2c1a6ea
changelog tweaks
bizob2828 Mar 15, 2023
e985c71
Merge pull request #172 from newrelic/release/v5.0.3
bizob2828 Mar 15, 2023
76939a0
NEWRELIC-7612 removes assertion of the x-newrelic-disable-dt header a…
bizob2828 Mar 17, 2023
336656e
Merge pull request #173 from bizob2828/pare-down-aws-assertion
bizob2828 Mar 20, 2023
2336e00
fix: adjust smithy instrumentation to fix Presigned URL usage
jmartin4563 Mar 30, 2023
d6f3627
add low priority to ensure our middleware is last
jmartin4563 Mar 30, 2023
94477f2
added smoke tests to automatically test agent against actual AWS serv…
jmartin4563 Mar 31, 2023
ae1a44b
tweaks for smoke test dependency install steps
jmartin4563 Mar 31, 2023
98e4b87
switch from sub-package.json to using dev deps for @aws-sdk dependenc…
jmartin4563 Mar 31, 2023
489fafc
temporarily adding branch push trigger to test workflow
jmartin4563 Mar 31, 2023
79d1b53
revert branch specific push trigger test
jmartin4563 Mar 31, 2023
c6781b9
rename smoke test workflow
jmartin4563 Mar 31, 2023
403633b
Update lib/v3/smithy-client.js
jmartin4563 Apr 4, 2023
8da65ce
Update lib/v3/smithy-client.js
jmartin4563 Apr 4, 2023
7a387ee
Merge pull request #178 from jmartin4563/fix-presigned-url-workflow
jmartin4563 Apr 4, 2023
d2353e6
Setting version to v5.0.4.
jmartin4563 Apr 4, 2023
b19181f
Adds auto-generated release notes.
jmartin4563 Apr 4, 2023
0393890
Merge pull request #179 from newrelic/release/v5.0.4
Apr 4, 2023
6cbbf32
Bump xml2js from 0.4.19 to 0.5.0
dependabot[bot] Apr 10, 2023
833c5d8
Merge pull request #180 from newrelic/dependabot/npm_and_yarn/xml2js-…
bizob2828 Apr 12, 2023
5de3249
updated agent and test utils to latest
bizob2828 Apr 20, 2023
c120871
Merge pull request #182 from newrelic/bump-agent
bizob2828 Apr 24, 2023
276b48d
assigned shimName to v3 instrumentation to restore isWrapped function…
bizob2828 Apr 27, 2023
34fafe0
Merge pull request #183 from bizob2828/fix-wrap-class-v3
bizob2828 Apr 28, 2023
b9f6fa4
Setting version to v5.0.5.
bizob2828 May 1, 2023
76532fb
Adds auto-generated release notes.
bizob2828 May 1, 2023
9408d60
changelog edits
bizob2828 May 1, 2023
94cede4
Merge pull request #184 from newrelic/release/v5.0.5
bizob2828 May 1, 2023
50b4146
chore: prevent testing on version 2.1372.0+ of aws-sdk as it has brok…
bizob2828 May 4, 2023
b8d38a6
Merge pull request #185 from newrelic/skip-new-v2-release
bizob2828 May 4, 2023
f0326a3
fixed version lockdown as it applies to both sqs in v2 and v3 of sdk
bizob2828 May 4, 2023
2405689
Merge pull request #187 from newrelic/skip-new-v2-release
bizob2828 May 5, 2023
b8cbb36
fix: Updated the mock AWS server to handle both XML and JSON.
bizob2828 May 4, 2023
1d214bc
fix: removed passing isJson into sns mocked responses
bizob2828 May 9, 2023
4fd1fa1
Merge pull request #188 from bizob2828/fix-v2
bizob2828 May 10, 2023
56c7dd0
Removed index.js for standalone operation
mrickard May 16, 2023
21f8964
Merge pull request #189 from mrickard/NEWRELIC-4869/remove-index-for-…
bizob2828 May 24, 2023
ecf45c4
chore: update explorer hub links in readme
jmartin4563 May 31, 2023
00df309
Merge pull request #190 from jmartin4563/fix-readme-forum-link
jmartin4563 May 31, 2023
eaeec05
ci: updated smoke tests to run npm install to get latest and console …
bizob2828 May 31, 2023
e8b7d92
chore: ignore console.log eslint, add package name and version to bot…
bizob2828 Jun 1, 2023
3070687
Merge pull request #191 from bizob2828/update-dep
bizob2828 Jun 1, 2023
30209a5
fix: package.json & package-lock.json to reduce vulnerabilities
snyk-bot Jun 27, 2023
99002bd
Merge pull request #192 from newrelic/snyk-fix-22fa37d016f9ad8ad22aa8…
bizob2828 Jun 27, 2023
4cdf9b4
fix: package.json & package-lock.json to reduce vulnerabilities
snyk-bot Jun 27, 2023
193888c
Merge pull request #193 from newrelic/snyk-fix-994ccda55aafe1c34296f3…
bizob2828 Jun 28, 2023
1838d2f
fix: added @smithy/smithy-client registration to nr-hooks.js because …
bizob2828 Jun 29, 2023
fb37176
Merge pull request #195 from bizob2828/fix-3-363-0
bizob2828 Jun 30, 2023
de39cd9
Setting version to v6.0.0.
bizob2828 Jun 30, 2023
1d1c67a
Adds auto-generated release notes.
bizob2828 Jun 30, 2023
473eb08
ci: changelog edits
bizob2828 Jun 30, 2023
68ce98d
Merge pull request #197 from newrelic/release/v6.0.0
bizob2828 Jun 30, 2023
9725d48
Bump protobufjs from 7.2.2 to 7.2.4
dependabot[bot] Jul 8, 2023
4574ba3
Merge pull request #198 from newrelic/dependabot/npm_and_yarn/protobu…
bizob2828 Jul 10, 2023
e67755f
chore: added node 20 and drop node 14 in CI
bizob2828 Jul 11, 2023
3941a8a
test: update assertion matches to match to remove deprecation warnings
bizob2828 Jul 11, 2023
6de8a82
test: updated min version of aws-sdk v2 to the package that works. i …
bizob2828 Jul 11, 2023
4ed2e62
Merge pull request #199 from bizob2828/node-20
bizob2828 Jul 18, 2023
19dded1
Bump word-wrap from 1.2.3 to 1.2.4
dependabot[bot] Jul 19, 2023
4a34c79
Merge pull request #202 from newrelic/dependabot/npm_and_yarn/word-wr…
bizob2828 Jul 19, 2023
03eb101
ci: skip version 3.377.0 of aws sdk packages as they are broken
bizob2828 Jul 26, 2023
fee422b
Merge pull request #203 from bizob2828/skip-3-377-0
bizob2828 Jul 26, 2023
a21e9af
chore!: Dropped Node 14
mrickard Aug 9, 2023
4ee01c9
Merge pull request #204 from mrickard/NR-142059/drop-node-14
bizob2828 Aug 16, 2023
af29cc1
feat: updated aws sdk v3 instrumentation to function with require-in-…
bizob2828 Aug 9, 2023
102ac9c
chore: updated instrumentation to assign the same shim id to all chil…
bizob2828 Aug 16, 2023
264d0c6
Merge pull request #205 from newrelic/ritm-update
bizob2828 Aug 17, 2023
a552ea2
Setting version to v7.0.0.
mrickard Aug 17, 2023
00d2be1
Adds auto-generated release notes.
mrickard Aug 17, 2023
f6c244d
chore: Updated CHANGELOG.md
mrickard Aug 17, 2023
75af591
Merge pull request #206 from newrelic/release/v7.0.0
bizob2828 Aug 18, 2023
0ab7c2a
chore: updated @newrelic/test-utilities to latest
bizob2828 Aug 30, 2023
e371d7d
Merge pull request #207 from bizob2828/update-test-utils
bizob2828 Aug 30, 2023
7e9cf9c
fix: updated smithy-client instrumentation to properly handle all typ…
bizob2828 Sep 15, 2023
8557838
Merge pull request #209 from bizob2828/allow-inheritance
bizob2828 Sep 15, 2023
0f70a35
Setting version to v7.0.1.
bizob2828 Sep 19, 2023
1e1a39f
Adds auto-generated release notes.
bizob2828 Sep 19, 2023
bee7543
Merge pull request #210 from newrelic/release/v7.0.1
bizob2828 Sep 19, 2023
2c48aa3
chore(deps): bump @babel/traverse
dependabot[bot] Oct 17, 2023
0e7a8ff
Merge pull request #212 from newrelic/dependabot/npm_and_yarn/babel/t…
bizob2828 Oct 23, 2023
bbc34a2
chore: removed newrelic as peer dep as standalone is no longer supported
bizob2828 Oct 24, 2023
4bb21c5
Merge pull request #214 from bizob2828/remove-peer-dep
bizob2828 Oct 25, 2023
853f3f7
Setting version to v7.0.2.
mrickard Oct 25, 2023
6979df5
Adds auto-generated release notes.
mrickard Oct 25, 2023
779abd5
chore: Edited CHANGELOG.md
mrickard Oct 25, 2023
71d5ffa
Merge pull request #215 from newrelic/release/v7.0.2
bizob2828 Oct 25, 2023
fc4d1c9
chore(deps): bump axios and newrelic
dependabot[bot] Nov 10, 2023
f700df8
Merge pull request #216 from newrelic/dependabot/npm_and_yarn/axios-a…
bizob2828 Nov 13, 2023
a0debe8
fix: Updated aws-sdk v3 instrumentation to only call `shim.setLibrary…
bizob2828 Dec 6, 2023
b21eda3
Merge pull request #219 from bizob2828/init-once
bizob2828 Dec 7, 2023
5745a2e
Setting version to v7.0.3.
mrickard Dec 7, 2023
ee3bf89
Adds auto-generated release notes.
mrickard Dec 7, 2023
453b9c2
chore: Edited CHANGELOG.md
mrickard Dec 7, 2023
c288afe
Merge pull request #220 from newrelic/release/v7.0.3
mrickard Dec 7, 2023
7cbde26
test: pin peer deps of @aws-sdk/util-dynamodb and @aws-sdk/client-dyn…
bizob2828 Dec 20, 2023
a999138
Merge pull request #231 from bizob2828/fix-lib-dynamo-tests
bizob2828 Dec 20, 2023
4fd82cb
test: Add mock server for Bedrock API (#230)
jsumners-nr Dec 21, 2023
6e4661a
ci: Updated prepare-release to use conventional commit based releases…
bizob2828 Dec 21, 2023
1a3fd80
test: Add missing test files to config (#233)
jsumners-nr Dec 21, 2023
a394921
test: Resolve issue with testing in main repo (#234)
jsumners-nr Dec 22, 2023
52c2451
chore: use latest of test deps for bedrock versioned tests (#235)
bizob2828 Jan 2, 2024
250494f
feat: Add initial objects for LLM events (#236)
jsumners-nr Jan 5, 2024
44f02c6
feat: Add instrumentation for InvokeModelCommand (#239)
bizob2828 Jan 9, 2024
1d38f77
feat: Add LLama2 support to LLM events and mock server (#238)
jsumners-nr Jan 9, 2024
fa20346
feat: Added ability to store feedback ids by request id (#240)
bizob2828 Jan 9, 2024
65352a2
refactor: adds a serialize method to LlmEvent to remove the complex o…
bizob2828 Jan 10, 2024
41fcc24
feat: Record metric on every InvokeModelCommand (#242)
svetlanabrennan Jan 11, 2024
b544041
feat: Added handling errors by adding additional attributes to the tr…
bizob2828 Jan 11, 2024
fbfabf7
feat: Add llm attribute to all transactions that contain llm spans fo…
svetlanabrennan Jan 12, 2024
5e0befa
ci: fixed misspelling in prepare-release.yml (#247)
bizob2828 Jan 12, 2024
6dd22f4
feat: Add Bedrock LLM streamed response handling (#245)
jsumners-nr Jan 18, 2024
a1e5c3a
refactor: Removed aws_bedrock_instrumentation feature flag as feature…
bizob2828 Jan 18, 2024
2a9d62d
chore: release v7.1.0 (#249)
github-actions[bot] Jan 18, 2024
c7e3f16
refactor: moved mock server to v3 so deps can be installed during ver…
bizob2828 Jan 18, 2024
be7f061
chore: Replace inlined bedrock server with test-utils version (#251)
jsumners-nr Feb 2, 2024
0bc8af4
chore: Apply LLM updates based on specification changes (#253)
jsumners-nr Feb 14, 2024
331c9bb
chore: Refactor LLM user added metadata (#256)
jsumners-nr Feb 15, 2024
f486d81
feat: Added ability to disable instrumenting streaming via `ai_monito…
bizob2828 Feb 20, 2024
d9c583d
refactor: Removed storing message, request and completion id to be us…
bizob2828 Feb 28, 2024
cde0a10
refactor: Updated aws sdk instrumentation to construct specs at instr…
bizob2828 Feb 28, 2024
0c83c06
chore: release v7.2.0 (#266)
github-actions[bot] Feb 29, 2024
dfe8683
feat: Added ability to disable capturing of content in LLM events `ai…
bizob2828 Mar 4, 2024
d67eae3
chore: Updated Bedrock entities with token_count (#269)
jsumners-nr Mar 5, 2024
dea3b69
feat: Added llm.tokenCountCallback support to Bedrock (#270)
jsumners-nr Mar 7, 2024
45c460e
chore: Changed token_count to only use tokenCountCallback (#272)
jsumners-nr Mar 11, 2024
bea1d1d
fix: Added override setting to middleware configuration (#273)
svetlanabrennan Mar 11, 2024
04b64a1
chore: release v7.3.0 (#274)
github-actions[bot] Mar 12, 2024
f070d20
chore: Sync package-lock.json with package.json file (#275)
svetlanabrennan Mar 12, 2024
36e7e1f
ci: Updated CI workflows to run `npm ci` instead of `npm install` to …
bizob2828 Mar 12, 2024
c49ae45
chore(deps-dev): bump follow-redirects from 1.15.5 to 1.15.6 (#277)
dependabot[bot] Mar 18, 2024
d34311d
chore: Removed unused attributes on LlmChatCompletionSummary and LlmE…
bizob2828 Apr 1, 2024
86ef13b
chore: Updated test-utils dependency (#279)
jsumners-nr Apr 2, 2024
be2903c
chore: release v7.4.0 (#280)
github-actions[bot] Apr 2, 2024
9532afa
ci: removed changelog.json file (#281)
svetlanabrennan Apr 2, 2024
b3ddc80
chore: Fixed typo on sqs v3 name (#282)
mrickard Apr 3, 2024
3a48c8b
ci: Removed `use_new_release` input from prepare release workflow (#283)
svetlanabrennan Apr 4, 2024
c4bec5b
chore: release v7.4.1 (#284)
github-actions[bot] Apr 9, 2024
6401f63
Merge remote-tracking branch 'aws-sdk/main' into add-aws-sdk
bizob2828 Apr 23, 2024
32624ed
refactor: Moved relevant aws instrumentation and rely on agent commons
bizob2828 Apr 23, 2024
f7fcf7e
chore: Updated aws instrumentation to rely on type constants
bizob2828 Apr 24, 2024
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
1,622 changes: 1,225 additions & 397 deletions THIRD_PARTY_NOTICES.md

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions lib/instrumentation/aws-sdk/nr-hooks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2020 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/

'use strict'
const InstrumentationDescriptor = require('../../instrumentation-descriptor')

const instrumentations = [
{
type: InstrumentationDescriptor.TYPE_CONGLOMERATE,
moduleName: 'aws-sdk',
onRequire: require('./v2/instrumentation')
},
{
type: InstrumentationDescriptor.TYPE_CONGLOMERATE,
moduleName: '@aws-sdk/smithy-client',
onRequire: require('./v3/smithy-client'),
shimName: 'aws-sdk'
},
{
type: InstrumentationDescriptor.TYPE_CONGLOMERATE,
moduleName: '@smithy/smithy-client',
onRequire: require('./v3/smithy-client'),
shimName: 'aws-sdk'
}
]

module.exports = instrumentations
38 changes: 38 additions & 0 deletions lib/instrumentation/aws-sdk/util.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2020 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/

'use strict'
const UNKNOWN = 'Unknown'
const {
params: { DatastoreParameters }
} = require('../../shim/specs')

function grabLastUrlSegment(url = '/') {
// cast URL as string, and an empty
// string for null, undefined, NaN etc.
url = '' + (url || '/')
const lastSlashIndex = url.lastIndexOf('/')
return url.substr(lastSlashIndex + 1)
}

/**
* Retrieves the db segment params from endpoint and command parameters
*
* @param {Object} endpoint instance of ddb endpoint
* @param {Object} params parameters passed to a ddb command
* @returns {Object}
*/
function setDynamoParameters(endpoint, params) {
return new DatastoreParameters({
host: endpoint && (endpoint.host || endpoint.hostname),
port_path_or_id: (endpoint && endpoint.port) || 443,
collection: (params && params.TableName) || UNKNOWN
})
}

module.exports = {
grabLastUrlSegment,
setDynamoParameters
}
105 changes: 105 additions & 0 deletions lib/instrumentation/aws-sdk/v2/core.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
* Copyright 2020 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/

'use strict'

const UNKNOWN = 'Unknown'
const symbols = require('../../../symbols')
const InstrumentationDescriptor = require('../../../instrumentation-descriptor')

function validate(shim, AWS) {
if (!shim.isFunction(AWS.NodeHttpClient)) {
shim.logger.debug('Could not find NodeHttpClient, not instrumenting.')
return false
}
if (!shim.isFunction(AWS.Service) || !shim.isFunction(AWS.Service.prototype.makeRequest)) {
shim.logger.debug('Could not find AWS.Service#makeRequest, not instrumenting.')
return false
}
return true
}

function instrument(shim, AWS) {
shim.wrap(AWS.NodeHttpClient.prototype, 'handleRequest', wrapHandleRequest)
shim.wrapReturn(AWS.Service.prototype, 'makeRequest', wrapMakeRequest)
}

function wrapHandleRequest(shim, handleRequest) {
return function wrappedHandleRequest(httpRequest) {
if (httpRequest) {
if (!httpRequest.headers) {
httpRequest.headers = Object.create(null)
}
httpRequest.headers[symbols.disableDT] = true
} else {
shim.logger.debug('Unknown arguments to AWS.NodeHttpClient#handleRequest!')
}

return handleRequest.apply(this, arguments)
}
}

function wrapMakeRequest(shim, fn, name, request) {
if (!request) {
shim.logger.trace('No request object returned from Service#makeRequest')
return
}

const service = getServiceName(this)
const region = this?.config?.region
request.on('complete', function onAwsRequestComplete() {
const httpRequest = request.httpRequest && request.httpRequest.stream
const segment = shim.getSegment(httpRequest)
if (!httpRequest || !segment) {
shim.logger.trace('No segment found for request, not extracting information.')
return
}

const requestRegion = request?.httpRequest?.region
const requestId = request?.response?.requestId

segment.addAttribute('aws.operation', request.operation || UNKNOWN)
segment.addAttribute('aws.requestId', requestId || UNKNOWN)
segment.addAttribute('aws.service', service || UNKNOWN)
segment.addAttribute('aws.region', requestRegion || region || UNKNOWN)
})

shim.wrap(request, 'promise', function wrapPromiseFunc(shim, original) {
const activeSegment = shim.getActiveSegment()

return function wrappedPromiseFunc() {
if (!activeSegment) {
return original.apply(this, arguments)
}

const promise = shim.applySegment(original, activeSegment, false, this, arguments)

return shim.bindPromise(promise, activeSegment)
}
})
}

function getServiceName(service) {
if (service.api && (service.api.abbreviation || service.api.serviceId)) {
return service.api.abbreviation || service.api.serviceId
}

// In theory, getting the `constructor.prototype` should be redundant with
// checking `service`. However, the aws-sdk dynamically generates classes and
// doing this deep check was the recommended method by the maintainers.
const constructor = service.constructor
const api = constructor && constructor.prototype && constructor.prototype.api
if (api) {
return api.abbreviation || api.serviceId
}
return null
}

module.exports = {
name: 'core',
type: InstrumentationDescriptor.TYPE_GENERIC,
validate,
instrument
}
103 changes: 103 additions & 0 deletions lib/instrumentation/aws-sdk/v2/dynamodb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/*
* Copyright 2020 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/

'use strict'
const InstrumentationDescriptor = require('../../../instrumentation-descriptor')

const DDB_OPERATIONS = [
'putItem',
'getItem',
'updateItem',
'deleteItem',
'createTable',
'deleteTable',
'query',
'scan'
]

const DOC_CLIENT_OPERATIONS = [
'get',
'put',
'update',
'delete',
'batchGet',
'batchWrite',
'transactGet',
'transactWrite',
'query',
'scan'
]
const {
OperationSpec,
params: { DatastoreParameters }
} = require('../../../shim/specs')

const { setDynamoParameters } = require('../util')

function instrument(shim, AWS) {
shim.setDatastore(shim.DYNAMODB)

// DynamoDB's service API methods are dynamically generated
// in the constructor so we have to wrap the return.
shim.wrapReturn(AWS, 'DynamoDB', function wrapDynamo(shim, fn, name, ddb) {
shim.recordOperation(
ddb,
DDB_OPERATIONS,
function wrapMethod(shim, original, operationName, args) {
const params = args[0]

return new OperationSpec({
name: operationName,
parameters: setDynamoParameters(this.endpoint, params),
callback: shim.LAST,
opaque: true
})
}
)
})

// DocumentClient's API is predefined so we can instrument the prototype.
// DocumentClient does defer to DynamoDB but it also does enough individual
// steps for the request we want to hide that instrumenting specifically and
// setting to opaque is currently required.
const docClientProto = AWS.DynamoDB.DocumentClient.prototype
shim.recordOperation(
docClientProto,
DOC_CLIENT_OPERATIONS,
function wrapOperation(shim, original, operationName, args) {
const params = args[0]
const dynamoOperation = this.serviceClientOperationsMap[operationName]

// DocumentClient can be defined with a different service such as AmazonDaxClient.
// In these cases, an endpoint property may not exist. In the DAX case,
// the eventual cached endpoint to be hit is not known at this point.
const endpoint = this.service && this.service.endpoint

return new OperationSpec({
name: dynamoOperation,
parameters: new DatastoreParameters({
host: endpoint?.host,
port_path_or_id: endpoint?.port,
collection: params?.TableName || 'Unknown'
}),
callback: shim.LAST,
opaque: true
})
}
)
}

module.exports = {
name: 'dynamodb',
type: InstrumentationDescriptor.TYPE_DATASTORE,
instrument,
validate: (shim, AWS) => {
if (!shim.isFunction(AWS.DynamoDB)) {
shim.logger.debug('Could not find DynamoDB, not instrumenting.')
return false
}
return true
}
}
31 changes: 31 additions & 0 deletions lib/instrumentation/aws-sdk/v2/instrumentation-helper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright 2020 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/

'use strict'

/**
* Series of tests to determine if the library
* has the features needed to provide instrumentation
* @param AWS
*/
const instrumentationSupported = function instrumentationSupported(AWS) {
// instrumentation requires the serviceClientOperationsMap property
/* eslint-disable-next-line */
if (
!AWS ||
!AWS.DynamoDB ||
!AWS.DynamoDB.DocumentClient ||
!AWS.DynamoDB.DocumentClient.prototype ||
!AWS.DynamoDB.DocumentClient.prototype.serviceClientOperationsMap
) {
return false
}

return true
}

module.exports = {
instrumentationSupported
}
34 changes: 34 additions & 0 deletions lib/instrumentation/aws-sdk/v2/instrumentation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright 2020 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/

'use strict'

const INSTRUMENTATIONS = [
require('./core'),
require('./dynamodb'),
require('./sqs'),
require('./sns')
]

const helper = require('./instrumentation-helper')

module.exports = function initialize(shim, AWS) {
if (!helper.instrumentationSupported(AWS)) {
return false
}
// Validate every instrumentation before attempting to run any of them.
for (const instrumentation of INSTRUMENTATIONS) {
if (!instrumentation.validate(shim, AWS)) {
return false
}
}

for (const instrumentation of INSTRUMENTATIONS) {
const subshim = shim.makeSpecializedShim(instrumentation.type, instrumentation.name)
instrumentation.instrument(subshim, AWS)
}

return true
}
42 changes: 42 additions & 0 deletions lib/instrumentation/aws-sdk/v2/sns.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2020 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/

'use strict'
const { MessageSpec } = require('../../../shim/specs')
const InstrumentationDescriptor = require('../../../instrumentation-descriptor')

module.exports = {
name: 'sns',
type: InstrumentationDescriptor.TYPE_MESSAGE,
validate: (shim, AWS) => {
if (!shim.isFunction(AWS.SNS)) {
shim.logger.debug('Could not find SNS, not instrumenting.')
return false
}
return true
},
instrument
}

function instrument(shim, AWS) {
shim.setLibrary(shim.SNS)

shim.wrapReturn(AWS, 'SNS', function wrapSns(shim, original, name, sns) {
shim.recordProduce(sns, 'publish', wrapPublish)
})
}

function wrapPublish(shim, original, name, args) {
return new MessageSpec({
callback: shim.LAST,
destinationName: getDestinationName(args[0]),
destinationType: shim.TOPIC,
opaque: true
})
}

function getDestinationName({ TopicArn, TargetArn }) {
return TopicArn || TargetArn || 'PhoneNumber' // We don't want the value of PhoneNumber
}
Loading
Loading