newrelic-lambda-cli 0.9.0__py2.py3-none-any.whl → 0.9.2__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -107,13 +107,11 @@ def register(group):
107
107
  def install(ctx, **kwargs):
108
108
  """Install New Relic AWS Lambda Layers"""
109
109
  input = LayerInstall(session=None, verbose=ctx.obj["VERBOSE"], **kwargs)
110
-
111
110
  input = input._replace(
112
111
  session=boto3.Session(
113
112
  profile_name=input.aws_profile, region_name=input.aws_region
114
113
  )
115
114
  )
116
-
117
115
  if input.aws_permissions_check:
118
116
  permissions.ensure_layer_install_permissions(input)
119
117
 
@@ -121,7 +119,16 @@ def install(ctx, **kwargs):
121
119
 
122
120
  with ThreadPoolExecutor() as executor:
123
121
  futures = [
124
- executor.submit(layers.install, input, function) for function in functions
122
+ executor.submit(
123
+ layers.install,
124
+ input._replace(
125
+ session=boto3.Session(
126
+ profile_name=input.aws_profile, region_name=input.aws_region
127
+ )
128
+ ),
129
+ function,
130
+ )
131
+ for function in functions
125
132
  ]
126
133
  install_success = all(future.result() for future in as_completed(futures))
127
134
 
@@ -178,13 +185,11 @@ def install(ctx, **kwargs):
178
185
  def uninstall(ctx, **kwargs):
179
186
  """Uninstall New Relic AWS Lambda Layers"""
180
187
  input = LayerUninstall(session=None, verbose=ctx.obj["VERBOSE"], **kwargs)
181
-
182
188
  input = input._replace(
183
189
  session=boto3.Session(
184
190
  profile_name=input.aws_profile, region_name=input.aws_region
185
191
  )
186
192
  )
187
-
188
193
  if input.aws_permissions_check:
189
194
  permissions.ensure_layer_uninstall_permissions(input)
190
195
 
@@ -192,7 +197,16 @@ def uninstall(ctx, **kwargs):
192
197
 
193
198
  with ThreadPoolExecutor() as executor:
194
199
  futures = [
195
- executor.submit(layers.uninstall, input, function) for function in functions
200
+ executor.submit(
201
+ layers.uninstall,
202
+ input._replace(
203
+ session=boto3.Session(
204
+ profile_name=input.aws_profile, region_name=input.aws_region
205
+ )
206
+ ),
207
+ function,
208
+ )
209
+ for function in functions
196
210
  ]
197
211
  uninstall_success = all(future.result() for future in as_completed(futures))
198
212
 
@@ -64,13 +64,11 @@ def register(group):
64
64
  def install(**kwargs):
65
65
  """Install New Relic AWS Lambda Log Subscriptions"""
66
66
  input = SubscriptionInstall(session=None, **kwargs)
67
-
68
67
  input = input._replace(
69
68
  session=boto3.Session(
70
69
  profile_name=input.aws_profile, region_name=input.aws_region
71
70
  )
72
71
  )
73
-
74
72
  if input.aws_permissions_check:
75
73
  permissions.ensure_subscription_install_permissions(input)
76
74
 
@@ -78,7 +76,15 @@ def install(**kwargs):
78
76
 
79
77
  with ThreadPoolExecutor() as executor:
80
78
  futures = [
81
- executor.submit(subscriptions.create_log_subscription, input, function)
79
+ executor.submit(
80
+ subscriptions.create_log_subscription,
81
+ input._replace(
82
+ session=boto3.Session(
83
+ profile_name=input.aws_profile, region_name=input.aws_region
84
+ )
85
+ ),
86
+ function,
87
+ )
82
88
  for function in functions
83
89
  ]
84
90
  install_success = all(future.result() for future in as_completed(futures))
@@ -119,13 +125,11 @@ def install(**kwargs):
119
125
  def uninstall(**kwargs):
120
126
  """Uninstall New Relic AWS Lambda Log Subscriptions"""
121
127
  input = SubscriptionUninstall(session=None, **kwargs)
122
-
123
128
  input = input._replace(
124
129
  session=boto3.Session(
125
130
  profile_name=input.aws_profile, region_name=input.aws_region
126
131
  )
127
132
  )
128
-
129
133
  if input.aws_permissions_check:
130
134
  permissions.ensure_subscription_uninstall_permissions(input)
131
135
 
@@ -133,7 +137,15 @@ def uninstall(**kwargs):
133
137
 
134
138
  with ThreadPoolExecutor() as executor:
135
139
  futures = [
136
- executor.submit(subscriptions.remove_log_subscription, input, function)
140
+ executor.submit(
141
+ subscriptions.remove_log_subscription,
142
+ input._replace(
143
+ session=boto3.Session(
144
+ profile_name=input.aws_profile, region_name=input.aws_region
145
+ )
146
+ ),
147
+ function,
148
+ )
137
149
  for function in functions
138
150
  ]
139
151
  uninstall_success = all(future.result() for future in as_completed(futures))
@@ -153,7 +153,7 @@ def _add_new_relic(input, config, nr_license_key):
153
153
  if any("NewRelicLambdaExtension" in s for s in new_relic_layer):
154
154
  runtime_handler = None
155
155
 
156
- # Only used by Python, Node.js and Java runtimes not using the
156
+ # Only used by Python, Node.js, Ruby, and Java runtimes not using the
157
157
  # NewRelicLambdaExtension layer
158
158
  if runtime_handler:
159
159
  update_kwargs["Handler"] = runtime_handler
@@ -202,6 +202,18 @@ def _add_new_relic(input, config, nr_license_key):
202
202
  "NEW_RELIC_LAMBDA_EXTENSION_ENABLED"
203
203
  ] = "false"
204
204
 
205
+ if "dotnet" in runtime:
206
+ update_kwargs["Environment"]["Variables"]["CORECLR_ENABLE_PROFILING"] = "1"
207
+ update_kwargs["Environment"]["Variables"][
208
+ "CORECLR_PROFILER"
209
+ ] = "{36032161-FFC0-4B61-B559-F6C5D41BAE5A}"
210
+ update_kwargs["Environment"]["Variables"][
211
+ "CORECLR_NEWRELIC_HOME"
212
+ ] = "/opt/lib/newrelic-dotnet-agent"
213
+ update_kwargs["Environment"]["Variables"][
214
+ "CORECLR_PROFILER_PATH"
215
+ ] = "/opt/lib/newrelic-dotnet-agent/libNewRelicProfiler.so"
216
+
205
217
  return update_kwargs
206
218
 
207
219
 
@@ -10,6 +10,12 @@ NR_DOCS_ACT_LINKING_URL = "https://docs.newrelic.com/docs/serverless-function-mo
10
10
  NEW_RELIC_ARN_PREFIX_TEMPLATE = "arn:aws:lambda:%s:451483290750"
11
11
  RUNTIME_CONFIG = {
12
12
  "dotnetcore3.1": {"LambdaExtension": True},
13
+ "dotnet6": {"LambdaExtension": True},
14
+ "dotnet8": {"LambdaExtension": True},
15
+ "java21": {
16
+ "Handler": "com.newrelic.java.HandlerWrapper::",
17
+ "LambdaExtension": True,
18
+ },
13
19
  "java17": {
14
20
  "Handler": "com.newrelic.java.HandlerWrapper::",
15
21
  "LambdaExtension": True,
@@ -36,6 +42,7 @@ RUNTIME_CONFIG = {
36
42
  },
37
43
  "provided": {"LambdaExtension": True},
38
44
  "provided.al2": {"LambdaExtension": True},
45
+ "provided.al2023": {"LambdaExtension": True},
39
46
  "python3.7": {
40
47
  "Handler": "newrelic_lambda_wrapper.handler",
41
48
  "LambdaExtension": True,
@@ -60,6 +67,14 @@ RUNTIME_CONFIG = {
60
67
  "Handler": "newrelic_lambda_wrapper.handler",
61
68
  "LambdaExtension": True,
62
69
  },
70
+ "ruby3.2": {
71
+ "Handler": "newrelic_lambda_wrapper.handler",
72
+ "LambdaExtension": True,
73
+ },
74
+ "ruby3.3": {
75
+ "Handler": "newrelic_lambda_wrapper.handler",
76
+ "LambdaExtension": True,
77
+ },
63
78
  }
64
79
 
65
80
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: newrelic-lambda-cli
3
- Version: 0.9.0
3
+ Version: 0.9.2
4
4
  Summary: A CLI to install the New Relic AWS Lambda integration and layers.
5
5
  Home-page: https://github.com/newrelic/newrelic-lambda-cli
6
6
  Author: New Relic
@@ -46,15 +46,18 @@ A CLI to install the New Relic AWS Lambda integration and layers.
46
46
  * Installs and configures a New Relic AWS Lambda layer onto your AWS Lambda functions
47
47
  * Automatically selects the correct New Relic layer for your function's runtime and region
48
48
  * Wraps your AWS Lambda functions without requiring a code change
49
- * Supports Go, Java, .NET, Node.js and Python AWS Lambda runtimes
49
+ * Supports Go, Java, .NET, Node.js, Python, and Ruby AWS Lambda runtimes
50
50
  * Easily uninstall the AWS Lambda layer with a single command
51
51
 
52
52
  ## Runtimes Supported
53
53
 
54
54
  * dotnetcore3.1
55
+ * dotnet6
56
+ * dotnet8
55
57
  * java8.al2
56
58
  * java11
57
59
  * java17
60
+ * java21
58
61
  * nodejs16.x
59
62
  * nodejs18.x
60
63
  * nodejs20.x
@@ -66,8 +69,10 @@ A CLI to install the New Relic AWS Lambda integration and layers.
66
69
  * python3.10
67
70
  * python3.11
68
71
  * python3.12
72
+ * ruby3.2
73
+ * ruby3.3
69
74
 
70
- **Note:** Automatic handler wrapping is only supported for Node.js, Python and Java. For other runtimes,
75
+ **Note:** Automatic handler wrapping is only supported for Node.js, Python, Java, and Ruby. For other runtimes,
71
76
  manual function wrapping is required using the runtime specific New Relic agent.
72
77
 
73
78
  ## Requirements
@@ -3,23 +3,23 @@ newrelic_lambda_cli/api.py,sha256=tkjuR_qkD2uZgXfXPFR6YKnmRiNYkrEmqQEeUgDtNn8,14
3
3
  newrelic_lambda_cli/cliutils.py,sha256=x2pWlL3DJ9t98QNElp_rhawNQoIZ0vd55R2jpo3_oI0,902
4
4
  newrelic_lambda_cli/functions.py,sha256=p57ZUw424BaSUA_Gw8DrYsJOYKROEHEaXgARadqwcP0,2800
5
5
  newrelic_lambda_cli/integrations.py,sha256=X9OuBK_sNfjb1cjbZ1dctd_YTVyEeCCGsPaJp0Bni1U,30864
6
- newrelic_lambda_cli/layers.py,sha256=3PHELrt3UNXgEW-9QyzbU50D399CMOAsHnel4N-B84g,14263
6
+ newrelic_lambda_cli/layers.py,sha256=7ntl48RVEoRO4iiD3yzsxgqNkx013vXO5wQuoP6M0-I,14805
7
7
  newrelic_lambda_cli/permissions.py,sha256=H7v5IMpKaJIWC4Dff2YcTis4BKAAFIJr9IHWUj1LnF4,9093
8
8
  newrelic_lambda_cli/subscriptions.py,sha256=wh6vroU8RfSEwqAMObjPNVPb0TbBxUYYPO_c3mY7miA,6166
9
9
  newrelic_lambda_cli/types.py,sha256=kzubT5cGiI-k6h_8b_iTaj3bnsNwolhjgSbpFJT9iBk,2304
10
- newrelic_lambda_cli/utils.py,sha256=PeLM-RWqHasGacY84UI1Ut-A5yFRMgoVeFaIbIksrEg,4855
10
+ newrelic_lambda_cli/utils.py,sha256=dYcSFZj7Mpgr5f8YSaAjt80N1q9akcOj1_puL8iRHak,5324
11
11
  newrelic_lambda_cli/cli/__init__.py,sha256=n_QPd3oJqkFxryy-pJ-Y_AsqsmgbTb3dlQCjPJueaYQ,544
12
12
  newrelic_lambda_cli/cli/decorators.py,sha256=a3agkVfy8omkUSL4aKblwSX95xtxYOGASULDYcJDPHk,1786
13
13
  newrelic_lambda_cli/cli/functions.py,sha256=RSh2Cowe1_oQup8q5YRidp03z-BITo2uzvDh4zvLr4I,2601
14
14
  newrelic_lambda_cli/cli/integrations.py,sha256=aQAWcCCU2kBmbF8fLKwKB9bzSY0uipvnojajjTkhqEs,10461
15
- newrelic_lambda_cli/cli/layers.py,sha256=R9vCMoUD9EYx-tJWoFMmWP-kJjoljg4ciWwgeiBLaXQ,5678
16
- newrelic_lambda_cli/cli/subscriptions.py,sha256=fuGdnENdjoKjVZ_3d1c2qf12pSsSTDokSJJyo4H9A9o,4067
15
+ newrelic_lambda_cli/cli/layers.py,sha256=3CTukG79vM2Gzx3NFXsqUEjy5mNQ4rawIh53oQeCyCI,6180
16
+ newrelic_lambda_cli/cli/subscriptions.py,sha256=fmFkGq8AGExOaHzQxMhYfOCmpxhnCwUWbeJUOuTWi60,4545
17
17
  newrelic_lambda_cli/templates/import-template.yaml,sha256=0r1yeoqpnqtEMggWomALkPG10NiANPWWBqz03rChch8,3771
18
18
  newrelic_lambda_cli/templates/license-key-secret.yaml,sha256=ZldQaLXsyF1K2I4X_AsLdH7kRmLkPUYI3talmhqQyHg,1849
19
19
  newrelic_lambda_cli/templates/nr-lambda-integration-role.yaml,sha256=s7T73B_k-mAwgzJrD2xn8YGUNgn2E1V7Exifrl81ViU,2874
20
- newrelic_lambda_cli-0.9.0.dist-info/LICENSE,sha256=uuxDzQm0yfq_tNZX0tQYzsZUVRIF0jm3dBLZUojSYzI,11345
21
- newrelic_lambda_cli-0.9.0.dist-info/METADATA,sha256=EQbwJCEoZpvIP2k6hLrYOPW_Cm8LXYolkaKnTAfvRbI,21660
22
- newrelic_lambda_cli-0.9.0.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
23
- newrelic_lambda_cli-0.9.0.dist-info/entry_points.txt,sha256=iks2k9Y4WNgIecsDzreIvMV9pGCjwwKTf33LKKvl2A8,65
24
- newrelic_lambda_cli-0.9.0.dist-info/top_level.txt,sha256=dxX2w58VgSUFiPD8C_lFuY-T2C1kjfeY0xi8iTh0r44,20
25
- newrelic_lambda_cli-0.9.0.dist-info/RECORD,,
20
+ newrelic_lambda_cli-0.9.2.dist-info/LICENSE,sha256=uuxDzQm0yfq_tNZX0tQYzsZUVRIF0jm3dBLZUojSYzI,11345
21
+ newrelic_lambda_cli-0.9.2.dist-info/METADATA,sha256=jkaZoQkVvvW6PWth1X6xRGrjMNUjK0VvH1IDU2hyBwI,21723
22
+ newrelic_lambda_cli-0.9.2.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
23
+ newrelic_lambda_cli-0.9.2.dist-info/entry_points.txt,sha256=iks2k9Y4WNgIecsDzreIvMV9pGCjwwKTf33LKKvl2A8,65
24
+ newrelic_lambda_cli-0.9.2.dist-info/top_level.txt,sha256=dxX2w58VgSUFiPD8C_lFuY-T2C1kjfeY0xi8iTh0r44,20
25
+ newrelic_lambda_cli-0.9.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any