-
Notifications
You must be signed in to change notification settings - Fork 117
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
Add spec for tracing Azure Functions #716
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice overall 👍
Some comments below.
Co-authored-by: Trent Mick <trent.mick@elastic.co>
Co-authored-by: Trent Mick <trent.mick@elastic.co>
70fa7cd
to
bc092f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added another suggestion for transaction.name
for an HTTP-triggered function after some playing with a custom routePrefix
in "host.json".
- If one specifies
routePrefix='foo'
, then routes are/foo/MyFuncName
as expected. - If one specifies
routePrefix='/foo'
, then routes are//foo/MyFuncName
. HoweverGET /foo/MyFuncName
works, so I think we should normalize the transaction name to just have a single leading slash. - If one specifies
routePrefix=''
(the empty string), then routes are/MyFuncName
. - If one specifies
routePrefix='foo/'
(i.e. with a trailing slash), then routes are/foo//MyFuncName
are the Azure Function host code blows up with:
2023-01-03T22:39:04.082 [Error] A host error has occurred during startup operation '513902a7-f0bb-4586-8da2-1ce9c223e8bc'.Microsoft.AspNetCore.Routing.RouteCreationException : An error occurred while creating the route with name 'HttpFn1' and template '/foo//HttpFn1'. ---> System.ArgumentException : The route template separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value. (Parameter 'routeTemplate') ---> Microsoft.AspNetCore.Routing.Patterns.RoutePatternException : The route template separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value.at Microsoft.AspNetCore.Routing.Patterns.RoutePatternParser.Parse(String pattern)at Microsoft.AspNetCore.Routing.Patterns.RoutePatternFactory.Parse(String pattern)at Microsoft.AspNetCore.Routing.Template.TemplateParser.Parse(String routeTemplate)End of inner exceptionat
...
The last point shows that we don't need to worry about normalizing the number of slashes other than at the start of the URL path.
Co-authored-by: Trent Mick <trent.mick@elastic.co>
For reference: One of the lingering concerns with APM agents running in Azure Functions had been whether the asynchronous intake requests to APM server would have an adverse impact on the billing/cost of those Azure Functions. I did some experiments around this and came to the conclusion that: no, there is no impact on cost from the regular background intake requests. My write-up is here: elastic/apm-agent-nodejs#3071 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just one more suggestion to add the config var name.
Co-authored-by: Trent Mick <trent.mick@elastic.co>
Co-authored-by: Trent Mick <trent.mick@elastic.co>
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>
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>
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>
This is a first specification draft for tracing Azure Functions.
The scope of this PR is generic instrumentation and the HTTP trigger type.
Please also take a lot at the related draft PR regarding Azure Functions metadata: #712
CODEOWNERS
)To auto-merge the PR, add
/
schedule YYYY-MM-DD
to the PR description.