-
Notifications
You must be signed in to change notification settings - Fork 42
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
Url is missing from appinsights logs for requests if use FunctionStartup #63
Comments
Hi @dhanore, Thank you for your feedback! We will check for the possibilities internally and update you with the findings. |
Thank you for picking up this bug. |
Hi, Did you get a chance to look into this issue or any plan for upcoming days to give some feedback?. |
@v-bbalaiagar |
@v-bbalaiagar @fabiocav @brettsam - Can you please let me know what is the status of this issue and where is this issue has transferred so I can see the status of it and any workaround for this issue as this is a priority task in our board? |
@dhanore would you mind sharing the full startup implementations for both cases (or a reduced repro) either here or in a repo? |
Below is WebJobStartup code - which is not giving Url for request in appInsights and FunctionStartup code which is giving result after that
Function Startup which is giving Url of Request in AppInsights
|
requests | where cloud_RoleName contains "test" | order by duration desc | project itemType, cloud_RoleName, url, appName, timestamp, name, cloud_RoleInstance.
What we have observed - If Startup class inherit IWebJobStartup then we are getting URL in appinsights logs for request, but if Startup class inherit FunctionStartup then we are not getting Url in appinsights logs.
We want to use Startup class Inherit FunctionStartup as we have written so much code based upon that in so many services. And we want to use constructor DI which is not possible in IWebJobStartup (as per sample which I have).
[assembly: WebJobsStartup(typeof(Startup))]
namespace TestApplicationWebJob.Infrastructure
{
[ExcludeFromCodeCoverage]
internal class Startup : IWebJobsStartup
{
static string appInstanceId = Guid.NewGuid().ToString();
public void Configure(IWebJobsBuilder builder)
{
#pragma warning disable CS0618 // Type or member is obsolete
builder.AddDependencyInjection(ConfigureServices);
builder.AddSwashBuckle(Assembly.GetExecutingAssembly(), opts =>
{
[assembly: FunctionsStartup(typeof(Startup))]
namespace TestApplicationFunc.Infrastructure
{
[ExcludeFromCodeCoverage]
public class Startup : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder)
{
RegisterServices(builder.Services);
The text was updated successfully, but these errors were encountered: