Closed spike008t closed 3 years ago
facing same issue for dotnet core 2.2, mcr.microsoft.com/dotnet/core/sdk:2.2
I have tried adding this in the docker file:
RUN dotnet add <ProjectName> package Microsoft.ApplicationInsights.Profiler.AspNetCore -v 2.1.0-beta4
ARG APPINSIGHTS_KEY
# Making sure the argument is set. Fail the build of the container otherwise.
RUN test -n "$APPINSIGHTS_KEY"
# Light up Application Insights and Service Profiler
ENV APPINSIGHTS_INSTRUMENTATIONKEY $APPINSIGHTS_KEY
ENV ASPNETCORE_HOSTINGSTARTUPASSEMBLIES Microsoft.ApplicationInsights.Profiler.AspNetCore
and relevant argument in docker-compose.yml
build:
args:
APPINSIGHTS_KEY: "<InstrumentationKey>"
@spike008t, I'll take a look.
Hi @spike008t , I tried a simple webapi on alpine and it looks like it worked for me. Could you please turn on Trace logs and run it again and send over the logs for analysis?
My logs just FYI:
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.AspNetCore.ConfigureUserConfiguration[0]
Configure user configuration.
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.AspNetCore.ConfigureUserConfiguration[0]
{
"BufferSizeInMB": 250,
"Duration": "00:00:30",
"InitialDelay": "00:00:00",
"ConfigurationUpdateFrequency": "00:00:05",
"ProvideAnonymousTelemetry": true,
"IsDisabled": false,
"RandomProfilingOverhead": 0.05,
"IsSkipCompatibilityTest": false,
"Endpoint": null,
"SkipUpload": false,
"PreserveTraceFile": false,
"SkipEndpointCertificateValidation": false,
"CPUTriggerThreshold": 80.0,
"MemoryTriggerThreshold": 80.0,
"StandaloneMode": false
}
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.AspNetCore.ServiceProfilerStartupFilter[0]
Constructing ServiceProfilerStartupFilter
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.AspNetCore.ConfigureUserConfiguration[0]
Configure user configuration.
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.AspNetCore.ConfigureUserConfiguration[0]
{
"BufferSizeInMB": 250,
"Duration": "00:00:30",
"InitialDelay": "00:00:00",
"ConfigurationUpdateFrequency": "00:00:05",
"ProvideAnonymousTelemetry": true,
"IsDisabled": false,
"RandomProfilingOverhead": 0.05,
"IsSkipCompatibilityTest": false,
"Endpoint": null,
"SkipUpload": false,
"PreserveTraceFile": false,
"SkipEndpointCertificateValidation": false,
"CPUTriggerThreshold": 80.0,
"MemoryTriggerThreshold": 80.0,
"StandaloneMode": false
}
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.AspNetCore.ServiceProfilerStartupFilter[0]
User Settings:
{
"BufferSizeInMB": 250,
"Duration": "00:00:30",
"InitialDelay": "00:00:00",
"ConfigurationUpdateFrequency": "00:00:05",
"ProvideAnonymousTelemetry": true,
"IsDisabled": false,
"RandomProfilingOverhead": 0.05,
"IsSkipCompatibilityTest": false,
"Endpoint": null,
"SkipUpload": false,
"PreserveTraceFile": false,
"SkipEndpointCertificateValidation": false,
"CPUTriggerThreshold": 80.0,
"MemoryTriggerThreshold": 80.0,
"StandaloneMode": false
}
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.AspNetCore.ServiceProfilerStartupFilter[0]
Starting service profiler from application builder.
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.AspNetCore.ServiceProfilerStartupFilter[0]
Pass Runtime Compatibility test.
[40m[32minfo[39m[22m[49m: ServiceProfiler.EventPipe.AspNetCore.ServiceProfilerStartupFilter[0]
Starting application insights profiler with instrumentation key: redacted
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.ResourceUsageSource[0]
CPU Triggering settings: {
"Enabled": true,
"CpuThreshold": 80.0,
"CpuAverageWindow": 30,
"CpuRollingHistorySize": 10,
"CpuRollingHistoryInterval": 30,
"CpuTriggerCooldownInSeconds": 14400,
"CpuTriggerProfilingDurationInSeconds": 120
}
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.ResourceUsageSource[0]
Memory Triggering settings: {
"Enabled": true,
"MemoryThreshold": 80.0,
"MemoryAverageWindow": 30,
"MemoryRollingHistorySize": 10,
"MemoryRollingHistoryInterval": 30,
"MemoryTriggerCooldownInSeconds": 14400,
"MemoryTriggerProfilingDurationInSeconds": 120
}
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.Orchestration.MetricsProviders.MemInfoFileMemoryMetricsProvider[0]
Get memory usage: free/total: 8974912/12995964
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.Orchestration.MetricsProviders.MemInfoFileMemoryMetricsProvider[0]
Get memory usage: free/total: 8974912/12995964
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.OrchestratorEventPipe[0]
Starting the orchestrator.
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.OrchestratorEventPipe[0]
5 scheduling policies has been activated.
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.Orchestration.SchedulingPolicy[0]
Scheduling Policy: OneTimeSchedulingPolicy requesting StartProfilingSession for 00:00:30
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Entering StartServiceProfilerAsync.
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Got the semaphore. Try starting the Profiler.
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Trace: /tmp/b438e128-2fba-4e24-847a-bdfb2600699d.netperf
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Call TraceControl.Enable().
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Trace Configuration:
===============================
{
"TraceProviders": [
{
"Name": "Microsoft-Windows-DotNETRuntime",
"ProviderGuid": "e13c0d23-ccbc-4e12-931b-d9cc2eee27e4",
"Keyword": 20423101629,
"Level": 5
},
{
"Name": "Microsoft-Windows-DotNETRuntimePrivate",
"ProviderGuid": "763fd754-7086-4dfe-95eb-c01a46faf4ca",
"Keyword": 1073872907,
"Level": 5
},
{
"Name": "Microsoft-DotNETCore-SampleProfiler",
"ProviderGuid": "3c530d44-97ae-513a-1e6d-783e8f8e03a9",
"Keyword": 0,
"Level": 5
},
{
"Name": "System.Threading.Tasks.TplEventSource",
"ProviderGuid": "2e5dba47-a3d2-4d16-8ee0-6671ffdcd7b5",
"Keyword": 199,
"Level": 5
},
{
"Name": "Microsoft-ApplicationInsights-DataRelay",
"ProviderGuid": "8206c581-c6a3-550a-af53-6e0421740cbe",
"Keyword": 4294967295,
"Level": 5
}
],
"TraceFilePath": "/tmp/b438e128-2fba-4e24-847a-bdfb2600699d.netperf",
"CircularBufferMB": 250
}
===============================
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceControls.TraceControl[0]
Enabling EventPipe . . .
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceControls.TraceControl[0]
Step1. Turning build the configuration, turning on the event sources
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceControls.TraceControl[0]
Step2. Turn on EventPipe by calling into the Reflected method.
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceControls.TraceControl[0]
EventPipe enabled.
[40m[32minfo[39m[22m[49m: Microsoft.Hosting.Lifetime[0]
Now listening on: http://[::]:80
[40m[32minfo[39m[22m[49m: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
[40m[32minfo[39m[22m[49m: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
[40m[32minfo[39m[22m[49m: Microsoft.Hosting.Lifetime[0]
Content root path: /app
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Start to create trace session listenter by its factory
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
[2020-06-12T00:42:16.9241567+00:00] Enabling EventSource: Microsoft-ApplicationInsights-Data
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Activating trace session listener: TraceSessionListener30
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
TraceSessionListener created.
[40m[32minfo[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Service Profiler session started.
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Message, Keywords: 2, OpCode: Info
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Message, Keywords: 2, OpCode: Info
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.OrchestratorEventPipe[0]
Profiling is started. Source: OneTimeSchedulingPolicy
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.MemoryMonitoringSchedulingPolicy[0]
Memory Usage: 30
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.CPUMonitoringSchedulingPolicy[0]
CPU Usage: 0
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: RemoteDependency, Keywords: 16, OpCode: Info
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Request, Keywords: 1024, OpCode: Start
[40m[1m[33mwarn[39m[22m[49m: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Message, Keywords: 2, OpCode: Info
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Message, Keywords: 2, OpCode: Info
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Message, Keywords: 2, OpCode: Info
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.CPUMonitoringSchedulingPolicy[0]
CPU Usage: 0
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.MemoryMonitoringSchedulingPolicy[0]
Memory Usage: 30
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: RemoteDependency, Keywords: 16, OpCode: Info
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.CPUMonitoringSchedulingPolicy[0]
CPU Usage: 0
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.MemoryMonitoringSchedulingPolicy[0]
Memory Usage: 30
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Request, Keywords: 1024, OpCode: Stop
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Request, Keywords: 1, OpCode: Info
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
Sample is added: {"StartActivityIdPath":"/#1/1/1/1/","StopActivityIdPath":"/#1/1/1/1/","StartTimeUtc":"2020-06-12T00:42:20.0284254+00:00","StopTimeUtc":"2020-06-12T00:42:27.1162825+00:00","RequestId":"e74667273125944c","RoleInstance":"c5e2cdd6ce11","OperationName":"GET WeatherForecast/Get","OperationId":"0bfe53e8e1f7f643af71844d23b74dc6","Duration":"00:00:07.0966571"}
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: RemoteDependency, Keywords: 16, OpCode: Info
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Request, Keywords: 1024, OpCode: Start
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.CPUMonitoringSchedulingPolicy[0]
CPU Usage: 0
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.MemoryMonitoringSchedulingPolicy[0]
Memory Usage: 30
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: RemoteDependency, Keywords: 16, OpCode: Info
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Request, Keywords: 1024, OpCode: Stop
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Request, Keywords: 1, OpCode: Info
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
Sample is added: {"StartActivityIdPath":"/#1/1/4/1/","StopActivityIdPath":"/#1/1/4/1/","StartTimeUtc":"2020-06-12T00:42:28.9602809+00:00","StopTimeUtc":"2020-06-12T00:42:34.4125282+00:00","RequestId":"8b63f99ddc299145","RoleInstance":"c5e2cdd6ce11","OperationName":"GET WeatherForecast/Get","OperationId":"34fd1956619e3e43a047c1bc41dcc74a","Duration":"00:00:05.4520986"}
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Request, Keywords: 1024, OpCode: Start
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.CPUMonitoringSchedulingPolicy[0]
CPU Usage: 0
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.MemoryMonitoringSchedulingPolicy[0]
Memory Usage: 30
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: RemoteDependency, Keywords: 16, OpCode: Info
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.CPUMonitoringSchedulingPolicy[0]
CPU Usage: 0
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.MemoryMonitoringSchedulingPolicy[0]
Memory Usage: 30
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: RemoteDependency, Keywords: 16, OpCode: Info
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Request, Keywords: 1024, OpCode: Stop
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Request, Keywords: 1, OpCode: Info
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
Sample is added: {"StartActivityIdPath":"/#1/1/6/1/","StopActivityIdPath":"/#1/1/6/1/","StartTimeUtc":"2020-06-12T00:42:36.5480114+00:00","StopTimeUtc":"2020-06-12T00:42:45.4424048+00:00","RequestId":"d05e203497ae8d48","RoleInstance":"c5e2cdd6ce11","OperationName":"GET WeatherForecast/Get","OperationId":"fb564b502a4a8a4186ac8843ad3ba944","Duration":"00:00:08.8945695"}
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.Orchestration.MetricsProviders.MemInfoFileMemoryMetricsProvider[0]
Get memory usage: free/total: 8680512/12995964
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.OrchestratorEventPipe[0]
Stopping Profiler by OneTimeSchedulingPolicy
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Message, Keywords: 2, OpCode: Info
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.EventListeners.TraceSessionListener30[0]
OnRichPayloadEventWritten - EventName: Message, Keywords: 2, OpCode: Info
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Entering StopServiceProfilerAsync.
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Disabling SessionListener
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceControls.TraceControl[0]
Disabling EventPipe . . .
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.CPUMonitoringSchedulingPolicy[0]
CPU Usage: 1
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.MemoryMonitoringSchedulingPolicy[0]
Memory Usage: 32
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceControls.TraceControl[0]
EventPipe disabled.
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Entering PostStopProcessAsync
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
There are 3 samples before validation.
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Start to validate trace.
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceValidators.ActivityListValidator[0]
[00:42:48] Hit on: /#1/1/1/1/. OpCode: Start, IsStartHit: True, IsStopHit: False
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceValidators.ActivityListValidator[0]
[00:42:48] Hit on: /#1/1/1/1/. OpCode: Stop, IsStartHit: True, IsStopHit: True
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceValidators.ActivityListValidator[0]
[00:42:48] Hit on: /#1/1/4/1/. OpCode: Start, IsStartHit: True, IsStopHit: False
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceValidators.ActivityListValidator[0]
[00:42:48] Hit on: /#1/1/4/1/. OpCode: Stop, IsStartHit: True, IsStopHit: True
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceValidators.ActivityListValidator[0]
[00:42:48] Hit on: /#1/1/6/1/. OpCode: Start, IsStartHit: True, IsStopHit: False
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceValidators.ActivityListValidator[0]
[00:42:48] Hit on: /#1/1/6/1/. OpCode: Stop, IsStartHit: True, IsStopHit: True
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Finished validate the trace.
[40m[32minfo[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Trace validation result: True
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Trace session finished. Invoking upload. Args:
{
"TraceFilePath": "/tmp/b438e128-2fba-4e24-847a-bdfb2600699d.netperf",
"SessionId": "2020-06-12T00:42:16.887004+00:00",
"StampFrontendHostUrl": "https://agent.azureserviceprofiler.net",
"Samples": [
{
"StartActivityIdPath": "/#1/1/6/1/",
"StopActivityIdPath": "/#1/1/6/1/",
"StartTimeUtc": "2020-06-12T00:42:36.5480114+00:00",
"StopTimeUtc": "2020-06-12T00:42:45.4424048+00:00",
"RequestId": "d05e203497ae8d48",
"RoleInstance": "c5e2cdd6ce11",
"OperationName": "GET WeatherForecast/Get",
"OperationId": "fb564b502a4a8a4186ac8843ad3ba944",
"Duration": "00:00:08.8945695"
},
{
"StartActivityIdPath": "/#1/1/4/1/",
"StopActivityIdPath": "/#1/1/4/1/",
"StartTimeUtc": "2020-06-12T00:42:28.9602809+00:00",
"StopTimeUtc": "2020-06-12T00:42:34.4125282+00:00",
"RequestId": "8b63f99ddc299145",
"RoleInstance": "c5e2cdd6ce11",
"OperationName": "GET WeatherForecast/Get",
"OperationId": "34fd1956619e3e43a047c1bc41dcc74a",
"Duration": "00:00:05.4520986"
},
{
"StartActivityIdPath": "/#1/1/1/1/",
"StopActivityIdPath": "/#1/1/1/1/",
"StartTimeUtc": "2020-06-12T00:42:20.0284254+00:00",
"StopTimeUtc": "2020-06-12T00:42:27.1162825+00:00",
"RequestId": "e74667273125944c",
"RoleInstance": "c5e2cdd6ce11",
"OperationName": "GET WeatherForecast/Get",
"OperationId": "0bfe53e8e1f7f643af71844d23b74dc6",
"Duration": "00:00:07.0966571"
}
],
"IsTraceValid": true,
"ProfilerSource": "OneTimeSchedulingPolicy"
}
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceUploader.TraceUploaderProxy[0]
uploaderPath by expand environment var of %SP_UPLOADER_PATH%: %SP_UPLOADER_PATH%
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceUploader.TraceUploaderProxy[0]
Environment variable of %SP_UPLOADER_PATH% is not set. Falls back to default path.
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceUploader.TraceUploaderProxy[0]
Searching for trace uploader at /app/ServiceProfiler/Microsoft.ApplicationInsights.Profiler.Uploader.dll
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.UploaderCallers.UploaderLocator[0]
Locating file path with input: /app/ServiceProfiler/Microsoft.ApplicationInsights.Profiler.Uploader.dll
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.UploaderCallers.UploaderLocator[0]
File uploader is not found. Try the zip file: /app/ServiceProfiler/TraceUpload.zip
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.UploaderCallers.UploaderLocator[0]
Zip file exist. Unzipping . . .
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.UploaderCallers.UploaderLocator[0]
File uploader is found: /app/ServiceProfiler/Microsoft.ApplicationInsights.Profiler.Uploader.dll
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.UploaderCallers.OutOfProcCaller[0]
Calling execute out of proc on dotnet with arguments: /app/ServiceProfiler/Microsoft.ApplicationInsights.Profiler.Uploader.dll -t "/tmp/b438e128-2fba-4e24-847a-bdfb2600699d.netperf" -i redacted -d e54708db-77b6-457e-b577-103e84229f2c --sessionId "2020-06-12T00:42:16.8870040Z" -s "eastus-kdhwlf5sz6p6s" --host https://agent.azureserviceprofiler.net --metadata "/tmp/b438e128-2fba-4e24-847a-bdfb2600699d.metadata"
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.MemoryMonitoringSchedulingPolicy[0]
Memory Usage: 32
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.CPUMonitoringSchedulingPolicy[0]
CPU Usage: 1
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.CPUMonitoringSchedulingPolicy[0]
CPU Usage: 1
[40m[37mdbug[39m[22m[49m: Microsoft.ServiceProfiler.EventPipe.Orchestration.MemoryMonitoringSchedulingPolicy[0]
Memory Usage: 32
[40m[32minfo[39m[22m[49m: ServiceProfiler.EventPipe.Client.TraceUploader.TraceUploaderProxy[0]
Finished calling trace uploader. Exit code: 0
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0]
Sending 3 valid custom events to AI.
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.SampleTransfers.CustomEventsTracker[0]
Start to send samples to AI.
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.SampleTransfers.CustomEventsTracker[0]
[2020-06-12T00:42:59.9228417+00:00] Sending custom event to AI:
{
"RequestId": "d05e203497ae8d48",
"ServiceProfilerVersion": "v2",
"ServiceProfilerContent": "v1|eastus-kdhwlf5sz6p6s|e54708db-77b6-457e-b577-103e84229f2c|c5e2cdd6ce11|1|2020-06-12T00:42:16.8870040Z|/#1/1/6/1/|2020-06-12T00:42:36.5480114Z|2020-06-12T00:42:45.4424048Z"
}.
iKey: redacted.
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.SampleTransfers.CustomEventsTracker[0]
[2020-06-12T00:42:59.9261169+00:00] Sending custom event to AI:
{
"RequestId": "8b63f99ddc299145",
"ServiceProfilerVersion": "v2",
"ServiceProfilerContent": "v1|eastus-kdhwlf5sz6p6s|e54708db-77b6-457e-b577-103e84229f2c|c5e2cdd6ce11|1|2020-06-12T00:42:16.8870040Z|/#1/1/4/1/|2020-06-12T00:42:28.9602809Z|2020-06-12T00:42:34.4125282Z"
}.
iKey: redacted.
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.SampleTransfers.CustomEventsTracker[0]
[2020-06-12T00:42:59.9263173+00:00] Sending custom event to AI:
{
"RequestId": "e74667273125944c",
"ServiceProfilerVersion": "v2",
"ServiceProfilerContent": "v1|eastus-kdhwlf5sz6p6s|e54708db-77b6-457e-b577-103e84229f2c|c5e2cdd6ce11|1|2020-06-12T00:42:16.8870040Z|/#1/1/1/1/|2020-06-12T00:42:20.0284254Z|2020-06-12T00:42:27.1162825Z"
}.
iKey: redacted.
[40m[37mdbug[39m[22m[49m: ServiceProfiler.EventPipe.Client.SampleTransfers.CustomEventsTracker[0]
3 events has been sent to AI as CustomEvents
[40m[37mtrce[39m[22m[49m: ServiceProfiler.EventPipe.Client.SampleTransfers.CustomEventsTracker[0]
[2020-06-12T00:42:59.9300728+00:00] Sending custom event to AI:
{
"FileId": "SOPwRjuLkCnO",
"DataCube": "e54708db-77b6-457e-b577-103e84229f2c",
"Source": "OneTimeSchedulingPolicy",
"ProcessId": "1",
"OperatingSystem": "Unix 4.19.104.0",
"StampId": "eastus-kdhwlf5sz6p6s",
"EtlFileSessionId": "2020-06-12T00:42:16.8870040Z",
"MachineName": "c5e2cdd6ce11"
}.
iKey: redacted.
And here's my docker file just FYI:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "ProfilerForAlpine.dll"]
@saurabhpati Your repro is in .NET Core 2.2 Ubuntu container, could you please open another issue, turn on the Trace logs? I'll help you troubleshooting there.
Close this due to no actionable. Feel free to open new issue if more help is needed.
I'm trying to make Profiler works under docker. I actually using the latest
dotnet/core/sdk:3.1-alpine
docker image. I'm actually using the latest packages available (based ondotnet list packages
command):The debug output when running the docker image locally:
Any idea how to make it works under docker container? And why the validation failed? (the aim is to deploy it on an azure app service for container).
Thank you