Expected behavior
When using the Core API (applicationinsights-core v2.6.2) to track PageViewTelemetry along with the Java Agent, PageViewTelemetry should continue to be sent, and user data, sessions, device, location, and other properties should reflect accordingly.
Actual behavior
When using the applicationinsights-core library by itself, everything is working as expected. PageViewTelemetry is properly sent and shows up for use in all report with accurate data.
When adding the 3.x agent along with the core api these items are being ignored, not sent, or removed from the telemetry data. Page views seem to be tracked but not with the data associated to them.
To Reproduce
- Create a spring boot application that has a servlet which implements the below example code.
- Test this locally to see that its working
- Add the java agent 3.0.0 or higher
- Test again and the events wont show up as expected
Sample Application
If applicable, provide a sample application which reproduces the issue.
static final TelemetryClient telemetryClient = new TelemetryClient(); telemetryClient.getContext().setInstrumentationKey(appInsightsKey); telemetryClient.getContext().getUser().setId("userID"); telemetryClient.getContext().getUser().setAccountId("userAccountID"); telemetryClient.getContext().getUser().setUserAgent(userAgent); telemetryClient.getContext().getDevice().setId("deviceid"); telemetryClient.getContext().getDevice().setOperatingSystem("OS"); telemetryClient.getContext().getSession().setId("SessionID"); telemetryClient.getContext().getProperties().put("Application", "App"); telemetryClient.getContext().getProperties().put("OS", "OS"); telemetryClient.getContext().getProperties().put("Tenant", "SomeTenant"); telemetryClient.getContext().getLocation().setIp("10.10.10.10"); telemetryClient.trackPageView("SomePage"); telemetryClient.flush();
Note - we are operating this from within a microservice gateway and for various reasons aren't using the javascript framework.
System information
Please provide the following information:
- SDK Version: 2.6.2
- OS type and version: MacOS / Ubuntu
- Application Server type and version (if applicable): Java 11
- Using spring-boot? Yes
- Additional relevant libraries (with version, if applicable):
Expected behavior
When using the Core API (applicationinsights-core v2.6.2) to track PageViewTelemetry along with the Java Agent, PageViewTelemetry should continue to be sent, and user data, sessions, device, location, and other properties should reflect accordingly.
Actual behavior
When using the applicationinsights-core library by itself, everything is working as expected. PageViewTelemetry is properly sent and shows up for use in all report with accurate data.
When adding the 3.x agent along with the core api these items are being ignored, not sent, or removed from the telemetry data. Page views seem to be tracked but not with the data associated to them.
To Reproduce
Sample Application
If applicable, provide a sample application which reproduces the issue.
static final TelemetryClient telemetryClient = new TelemetryClient(); telemetryClient.getContext().setInstrumentationKey(appInsightsKey); telemetryClient.getContext().getUser().setId("userID"); telemetryClient.getContext().getUser().setAccountId("userAccountID"); telemetryClient.getContext().getUser().setUserAgent(userAgent); telemetryClient.getContext().getDevice().setId("deviceid"); telemetryClient.getContext().getDevice().setOperatingSystem("OS"); telemetryClient.getContext().getSession().setId("SessionID"); telemetryClient.getContext().getProperties().put("Application", "App"); telemetryClient.getContext().getProperties().put("OS", "OS"); telemetryClient.getContext().getProperties().put("Tenant", "SomeTenant"); telemetryClient.getContext().getLocation().setIp("10.10.10.10"); telemetryClient.trackPageView("SomePage"); telemetryClient.flush();Note - we are operating this from within a microservice gateway and for various reasons aren't using the javascript framework.
System information
Please provide the following information: