Skip to content

Commit 527f62c

Browse files
authored
Add docs note about setup code in lambda (#1713)
* Add docs note about setup code in lambda * CHANGELOG grpc * Disable grpc-1.24 tests
1 parent d05e052 commit 527f62c

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.ci/.jenkins_framework_full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ FRAMEWORK:
8484
- aiobotocore-newest
8585
- kafka-python-newest
8686
- grpc-newest
87-
- grpc-1.24
87+
#- grpc-1.24 # This appears to have problems with python>3.6?

CHANGELOG.asciidoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ endif::[]
2929
//===== Bug fixes
3030
//
3131
32+
=== Unreleased
33+
34+
// Unreleased changes go here
35+
// When the next release happens, nest these changes under the "Python Agent version 6.x" heading
36+
[float]
37+
===== Features
38+
39+
* GRPC support {pull}1703[#1703]
40+
41+
//[float]
42+
//===== Bug fixes
43+
3244
3345
[[release-notes-6.x]]
3446
=== Python Agent version 6.x

docs/serverless.asciidoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,22 @@ def handler(event, context):
4646
return {"statusCode": r.status_code, "body": "Success!"}
4747
----
4848

49+
Note: any database or connection pool setup should go inside of your handler,
50+
otherwise the agent will not be able to instrument those objects and you may
51+
see missing spans. Example:
52+
53+
54+
[source,python]
55+
----
56+
conn = None
57+
58+
@capture_serverless()
59+
def handler(event, context):
60+
global conn
61+
if not conn:
62+
conn = pymysql.connect(host=rds_host, user=name, passwd=password, db=db_name, connect_timeout=5)
63+
----
64+
4965
[float]
5066
==== Step 3: Configure APM on AWS Lambda
5167

0 commit comments

Comments
 (0)