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

feat: Azure Functions #3071

Merged
merged 50 commits into from
Jan 16, 2023
Merged

feat: Azure Functions #3071

merged 50 commits into from
Jan 16, 2023

Conversation

trentm
Copy link
Member

@trentm trentm commented Dec 13, 2022

Spec: elastic/apm#716
Closes: #3015

Checklist

This first commit is just a start at working on require-in-the-middle
(pulling it in locally for now to work on it, before upstreaming).
…c auto-instrumentation of Azure Functions working
@trentm trentm self-assigned this Dec 13, 2022
@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label Dec 13, 2022
@apmmachine
Copy link
Contributor

apmmachine commented Dec 13, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-01-16T22:13:14.229+0000

  • Duration: 23 min 15 sec

Test stats 🧪

Test Results
Failed 0
Passed 321750
Skipped 0
Total 321750

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run module tests for <modules> : Run TAV tests for one or more modules, where <modules> can be either a comma separated list of modules (e.g. memcached,redis) or the string literal ALL to test all modules

  • run benchmark tests : Run the benchmark test only.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

trentm added a commit to elastic/apm-nodejs-http-client that referenced this pull request Dec 15, 2022
This is a way to provide additional metadata that is merged into the
metadata object created from the other individual config options. This
is similar to `expectExtraMetadata: true` && `setExtraMetadata(...)`,
but is a way to provide the metadata *synchronously*.

Refs: elastic/apm-agent-nodejs#3071
trentm added a commit to elastic/apm-nodejs-http-client that referenced this pull request Dec 16, 2022
This is a way to provide additional metadata that is merged into the
metadata object created from the other individual config options. This
is similar to `expectExtraMetadata: true` && `setExtraMetadata(...)`,
but is a way to provide the metadata *synchronously*.

Refs: elastic/apm-agent-nodejs#3071
@trentm trentm marked this pull request as ready for review January 12, 2023 01:35
@trentm
Copy link
Member Author

trentm commented Jan 12, 2023

I'll open an issue on Azure/azure-functions-nodejs-worker later asking about this and whether NODE_OPTIONS can get passed through to the workers on process start. However, for now we will have to resort to user code changes to enable Azure Function instrumentation.

I'm not bothering for now. An argument for this would be if one could add instrumentation to an Azure Function purely with config changes. However, given Azure Functions don't have an equivalent to Lambda "layers" to include the APM agent code itself, there will always be some non-config changes (to include the 'elastic-apm-node' dep). If that requirement is every dropped, then there would be value in supporting NODE_OPTIONS from initial creation of the extra worker processes.

@trentm
Copy link
Member Author

trentm commented Jan 13, 2023

@bmorelli25 Are you able to review the docs I've added? The main added doc page is: https://apm-agent-nodejs_3071.docs-preview.app.elstc.co/guide/en/apm/agent/nodejs/master/azure-functions.html Thanks.

Copy link
Member

@bmorelli25 bmorelli25 left a comment

Choose a reason for hiding this comment

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

The docs look great! Just a couple suggestions and one question.

docs/azure-functions.asciidoc Outdated Show resolved Hide resolved
docs/azure-functions.asciidoc Outdated Show resolved Hide resolved
docs/azure-functions.asciidoc Show resolved Hide resolved
docs/azure-functions.asciidoc Outdated Show resolved Hide resolved
trentm and others added 4 commits January 13, 2023 13:05
Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co>
Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co>
… req not being set; remove some unnecessary test code in config.test.js
@trentm trentm merged commit b3cca90 into main Jan 16, 2023
@trentm trentm deleted the trentm/azure-functions branch January 16, 2023 22:39
trentm added a commit that referenced this pull request Jan 16, 2023
Support for tracing/monitoring Azure Functions.
Supported triggers/bindings: HTTP (spec'd), Timer (not spec'd).

Spec: elastic/apm#716
Closes: #3015
Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co>
trentm added a commit that referenced this pull request Jan 17, 2023
…re Functions

From "timer". Neither value is in the APM agents shared spec, but
"scheduled" is prior art from some Java instrumentations (e.g. for
Quartz).

Refs: #3071
trentm added a commit that referenced this pull request Jan 17, 2023
…re Functions (#3101)

From "timer". Neither value is in the APM agents shared spec, but
"scheduled" is prior art from some Java instrumentations (e.g. for
Quartz).

Refs: #3071
fpm-peter pushed a commit to fpm-git/apm-agent-nodejs that referenced this pull request Aug 20, 2024
Support for tracing/monitoring Azure Functions.
Supported triggers/bindings: HTTP (spec'd), Timer (not spec'd).

Spec: elastic/apm#716
Closes: elastic#3015
Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co>
fpm-peter pushed a commit to fpm-git/apm-agent-nodejs that referenced this pull request Aug 20, 2024
…re Functions (elastic#3101)

From "timer". Neither value is in the APM agents shared spec, but
"scheduled" is prior art from some Java instrumentations (e.g. for
Quartz).

Refs: elastic#3071
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-nodejs Make available for APM Agents project planning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Azure Functions
3 participants