Skip to content
Merged
Changes from 3 commits
Commits
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
12 changes: 12 additions & 0 deletions source/mongodb-handshake/handshake.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ Depending on which `client.env.name` has been selected, other FaaS fields in `cl
Missing variables or variables with values not matching the expected type MUST cause the corresponding `client.env`
field to be omitted and MUST NOT cause a user-visible error.

If any fields of `client.env.container` are populated, all FaaS values MUST be entirely omitted.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about cases where a container is deployed on AWS Lambda? https://docs.aws.amazon.com/lambda/latest/dg/images-create.html

Wouldn't we want to include both in that case?

IIRC the issue that motivated this drivers ticket was a customer was not using Lambda but lambda still showed up in the client metadata. It looks like they were using pymongo 4.6.0. We added container detection in pymongo 4.7: PYTHON-3837.


##### Container

Container runtime information is captured in `client.env.container`.
Expand Down Expand Up @@ -511,6 +513,15 @@ the following sets of environment variables:
| -------------------- | ----- |
| `AWS_EXECUTION_ENV` | `EC2` |

9. Valid container and FaaS provider. This test MUST verify that only the container metadata is present in `client.env`.

| Environment Variable | Value |
| --------------------------------- | ------------------ |
| `AWS_EXECUTION_ENV` | `AWS_Lambda_java8` |
| `AWS_REGION` | `us-east-2` |
| `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` | `1024` |
| `KUBERNETES_SERVICE_HOST` | `1` |

## Motivation For Change

Being able to annotate individual connections with custom data will allow users and sysadmins to easily correlate events
Expand Down Expand Up @@ -593,6 +604,7 @@ support the `hello` command, the `helloOk: true` argument is ignored and the leg

## Changelog

- 2024-10-09: Clarify that FaaS metadata must not be populated when a container is also present.
- 2024-08-16: Migrated from reStructuredText to Markdown.
- 2019-11-13: Added section about supporting wrapping libraries
- 2020-02-12: Added section about speculative authentication
Expand Down
Loading