Skip to content

URLs in requests with spaces produce Exception in applicationinsights-agent-3.0.0-PREVIEW.5 #1290

@vchernogorov

Description

@vchernogorov

Expected behavior

I expect that telemetry for requests with spaces in the URL will be handled well.

Actual behavior

I see and ERROR in the agent's logs: Illegal character in query at index 64: https://graph.microsoft.com/v1.0/servicePrincipals?$filter=appId eq '<UUID>'. And I don't see the request in Azure Search dashboard.

To Reproduce

Steps to reproduce the behavior:
0. Setup logging output of the agent to the file like so:

{
  "instrumentationSettings": {
    "preview": {
      "selfDiagnostics": {
        "destination": "file",
        "directory": "/var/log/applicationinsights",
        "level": "INFO",
        "maxSizeMB": 10
      }
    }
  }
}
  1. Run your application with java -javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.5 -jar app.jar command.
  2. tail -f /var/log/applicationinsights/applicationinsights.log

System information

Please provide the following information:

  • SDK Version: applicationinsights-agent-3.0.0-PREVIEW.5
  • OS type and version: macOS Catalina 10.15.5 (19F101)
  • Application Server type and version (if applicable): org.apache.tomcat.emded:tomcat-embed-core:9.0.36
  • Using spring-boot? 2.3.1-RELEASE
  • Additional relevant libraries (with version, if applicable):
    implementation "com.microsoft.azure:applicationinsights-spring-boot-starter:2.6.1"
    implementation "com.microsoft.azure:applicationinsights-logging-logback:2.6.1"
    implementation 'com.microsoft.azure:azure-spring-boot-metrics-starter:2.3.2'

Logs

2020-07-24 00:59:01.371+04 WARN  c.m.a.i.c.c.ConnectionString - Connection string is overriding previously configured instrumentation key.
2020-07-24 00:59:01.384+04 INFO  c.m.a.internal.util.LimitsEnforcer - 'MaxTelemetryBufferCapacity': null value is replaced with '%d'
2020-07-24 00:59:01.385+04 INFO  c.m.a.internal.util.LimitsEnforcer - 'FlushIntervalInSeconds': null value is replaced with '%d'
2020-07-24 00:59:01.385+04 INFO  c.m.a.internal.util.LimitsEnforcer - 'MaxTelemetryBufferCapacity': null value is replaced with '%d'
2020-07-24 00:59:01.385+04 INFO  c.m.a.internal.util.LimitsEnforcer - 'FlushIntervalInSeconds': null value is replaced with '%d'
2020-07-24 00:59:01.418+04 INFO  c.m.a.internal.util.LimitsEnforcer - 'Channel.MaxTransmissionStorageCapacityInMB': null value is replaced with '%d'
2020-07-24 00:59:01.480+04 INFO  c.m.a.i.heartbeat.HeartBeatModule - heartbeat is enabled
2020-07-24 00:59:01.497+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Can not read
2020-07-24 00:59:01.498+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Can not read
2020-07-24 00:59:03.473+04 INFO  a.extension.diagnostics - Application Insights Codeless Agent Attach Successful
2020-07-24 00:59:29.271+04 ERROR c.m.a.agent.Exporter - Illegal character in query at index 101: http://msd365fp-mr-dev-storage-westus.documents.azure.com/addresses/?$resolveFor=dbs&$filter=protocol eq rntbd
2020-07-24 00:59:36.654+04 ERROR c.m.a.agent.Exporter - Illegal character in query at index 134: http://msd365fp-mr-dev-storage-westus.documents.azure.com/addresses/?$resolveFor=dbs/01JqAA==/colls/01JqAJ3u+8c=/docs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0
2020-07-24 01:00:01.495+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Error while parsing file: '%s'
2020-07-24 01:00:01.495+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Error while parsing file: '%s'
2020-07-24 01:00:02.150+04 ERROR c.m.a.agent.Exporter - Illegal character in query at index 134: http://msd365fp-mr-dev-storage-westus.documents.azure.com/addresses/?$resolveFor=dbs/01JqAA==/colls/01JqAKtDHxM=/docs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0
2020-07-24 01:00:04.719+04 ERROR c.m.a.agent.Exporter - Illegal character in query at index 134: http://msd365fp-mr-dev-storage-westus.documents.azure.com/addresses/?$resolveFor=dbs/01JqAA==/colls/01JqAKtDHxM=/docs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0
2020-07-24 01:00:05.267+04 ERROR c.m.a.agent.Exporter - Illegal character in query at index 134: http://msd365fp-mr-dev-storage-westus.documents.azure.com/addresses/?$resolveFor=dbs/01JqAA==/colls/01JqAPQPM-E=/docs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0
2020-07-24 01:00:05.770+04 ERROR c.m.a.agent.Exporter - Illegal character in query at index 63: http://graph.microsoft.com/v1.0/servicePrincipals?$filter=appId eq '<UUID>'
2020-07-24 01:00:09.527+04 ERROR c.m.a.agent.Exporter - Illegal character in query at index 134: http://msd365fp-mr-dev-storage-westus.documents.azure.com/addresses/?$resolveFor=dbs/01JqAA==/colls/01JqAPQPM-E=/docs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0
2020-07-24 01:01:01.494+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Error while parsing file: '%s'
2020-07-24 01:01:01.494+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Error while parsing file: '%s'
2020-07-24 01:02:01.495+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Error while parsing file: '%s'
2020-07-24 01:02:01.495+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Error while parsing file: '%s'
2020-07-24 01:03:01.496+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Error while parsing file: '%s'
2020-07-24 01:03:01.497+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Error while parsing file: '%s'
2020-07-24 01:04:01.498+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Error while parsing file: '%s'
2020-07-24 01:04:01.498+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Error while parsing file: '%s'
2020-07-24 01:05:01.498+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Error while parsing file: '%s'
2020-07-24 01:05:01.498+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Error while parsing file: '%s'
2020-07-24 01:06:01.500+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Error while parsing file: '%s'
2020-07-24 01:06:01.500+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Error while parsing file: '%s'
2020-07-24 01:07:01.499+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Error while parsing file: '%s'
2020-07-24 01:07:01.500+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Error while parsing file: '%s'
2020-07-24 01:08:01.500+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Error while parsing file: '%s'
2020-07-24 01:08:01.501+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Error while parsing file: '%s'
2020-07-24 01:09:01.505+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Error while parsing file: '%s'
2020-07-24 01:09:01.505+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Error while parsing file: '%s'
2020-07-24 01:10:01.503+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_ProcessIOPerformanceCounter: Error in file '/proc/10193/io': Error while parsing file: '%s'
2020-07-24 01:10:01.503+04 ERROR c.m.a.i.p.AbstractUnixPerformanceCounter - Performance Counter JSDK_TotalCpuPerformanceCounter: Error in file '/proc/stat': Error while parsing file: '%s'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions