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

Update lambda docs for lambda layer + docker image #1826

Merged
merged 7 commits into from May 22, 2023

Conversation

basepi
Copy link
Contributor

@basepi basepi commented May 5, 2023

What does this pull request do?

Copies the structure of the lambda docs from the Node.js agent. I'm not sure if I missed any hooks, we'll have to check the docs build.

Related issues

Ref #1796 #1604
Depends on #1814 elastic/apm-aws-lambda#394

@basepi
Copy link
Contributor Author

basepi commented May 5, 2023

I'm missing whatever is required to get the python layer showing up in the docs preview. Perhaps my python-arn-replacement.asciidoc is wrong?

basepi and others added 2 commits May 11, 2023 11:20
Co-authored-by: Alexander Wert <AlexanderWert@users.noreply.github.com>
@basepi
Copy link
Contributor Author

basepi commented May 16, 2023

@AlexanderWert The python agent ARNs are now showing up as <SELECTED_AGENT_LAYER_ARN> in the preview, though we're getting closer.... 🤔

Perhaps that's expected behavior in the preview? I don't know.

@AlexanderWert
Copy link
Member

@AlexanderWert The python agent ARNs are now showing up as <SELECTED_AGENT_LAYER_ARN> in the preview, though we're getting closer.... 🤔

Perhaps that's expected behavior in the preview? I don't know.

I think that should be fixed once #1814 is merged and we have a release with a published Lambda layer. The replacement script looks up the latest Layer ARN version from the release table (here the example from Node.js: https://github.com/elastic/apm-agent-nodejs/releases/tag/v3.46.0). If it fails to look this up, it uses <SELECTED_AGENT_LAYER_ARN> instead.

As we do not have a release with that table yet for Python, that's expected behavior.

@basepi
Copy link
Contributor Author

basepi commented May 17, 2023

The replacement script looks up the latest Layer ARN version from the release table

@AlexanderWert I was planning to put the release table in a collapsed block like this:

Lambda Layer ARNs

Elastic APM Python agent layer ARNs

Region ARN
ap-northeast-1 arn:aws:lambda:ap-northeast-1:627286350134:layer:jcal-dev-elastic-apm-python:6
ap-northeast-2 arn:aws:lambda:ap-northeast-2:627286350134:layer:jcal-dev-elastic-apm-python:6
ap-northeast-3 arn:aws:lambda:ap-northeast-3:627286350134:layer:jcal-dev-elastic-apm-python:6
ap-south-1 arn:aws:lambda:ap-south-1:627286350134:layer:jcal-dev-elastic-apm-python:8
ap-southeast-1 arn:aws:lambda:ap-southeast-1:627286350134:layer:jcal-dev-elastic-apm-python:6
ap-southeast-2 arn:aws:lambda:ap-southeast-2:627286350134:layer:jcal-dev-elastic-apm-python:6
ca-central-1 arn:aws:lambda:ca-central-1:627286350134:layer:jcal-dev-elastic-apm-python:6
eu-central-1 arn:aws:lambda:eu-central-1:627286350134:layer:jcal-dev-elastic-apm-python:6
eu-north-1 arn:aws:lambda:eu-north-1:627286350134:layer:jcal-dev-elastic-apm-python:6
eu-west-1 arn:aws:lambda:eu-west-1:627286350134:layer:jcal-dev-elastic-apm-python:6
eu-west-2 arn:aws:lambda:eu-west-2:627286350134:layer:jcal-dev-elastic-apm-python:6
eu-west-3 arn:aws:lambda:eu-west-3:627286350134:layer:jcal-dev-elastic-apm-python:6
sa-east-1 arn:aws:lambda:sa-east-1:627286350134:layer:jcal-dev-elastic-apm-python:6
us-east-1 arn:aws:lambda:us-east-1:627286350134:layer:jcal-dev-elastic-apm-python:6
us-east-2 arn:aws:lambda:us-east-2:627286350134:layer:jcal-dev-elastic-apm-python:6
us-west-1 arn:aws:lambda:us-west-1:627286350134:layer:jcal-dev-elastic-apm-python:6
us-west-2 arn:aws:lambda:us-west-2:627286350134:layer:jcal-dev-elastic-apm-python:6

Do you think that will break your lookup script? I really like having our release notes uncluttered. Where is that script?

@AlexanderWert
Copy link
Member

The replacement script looks up the latest Layer ARN version from the release table

@AlexanderWert I was planning to put the release table in a collapsed block like this:

Lambda Layer ARNs
Do you think that will break your lookup script? I really like having our release notes uncluttered. Where is that script?

This is the script:
https://raw.githubusercontent.com/elastic/apm-aws-lambda/main/docs/lambda-selector/lambda-attributes-selector.asciidoc

It basically parses the HTML of the page. But it seems the table is available in the HTML code even if it is collapsed, so it should work with your proposal as well.

Copy link
Contributor

@beniwohli beniwohli left a comment

Choose a reason for hiding this comment

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

LGTM. Can't really comment on the docs JS magic, not familiar with that part.

@@ -10,6 +10,7 @@ To get you off the ground, we’ve prepared guides for setting up the Agent with
* <<starlette-support,Starlette/FastAPI>>
* <<sanic-support,Sanic>>
* <<lambda-support,AWS Lambda>>
* <<azure-functions-support,Azure Functions>>
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch!

@basepi basepi merged commit a16dd43 into elastic:main May 22, 2023
5 checks passed
APM-Agents (OLD) automation moved this from In Progress to Done May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants