Skip to content
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

livemetrics does not pick instrumentation key in code. #969

Closed
cijothomas opened this issue Jul 10, 2019 · 4 comments · Fixed by #982
Closed

livemetrics does not pick instrumentation key in code. #969

cijothomas opened this issue Jul 10, 2019 · 4 comments · Fixed by #982
Assignees
Milestone

Comments

@cijothomas
Copy link

Expected behavior

Configured ikey in code as per below doc.
https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-get-started?toc=%2Fazure%2Fazure-monitor%2Ftoc.json#alternative-ways-to-set-the-instrumentation-key
LiveMetrics and every other telemetry should pick this instrumentationkey.

Actual behavior

Describe what actually happened that was unexpected.
All expect Livemetrics is picking the instrumentation key.

To Reproduce

Follow doc above to set ikey in code, NOT in ai.xml.

Sample Application

If applicable, provide a sample application which reproduces the issue.

System information

Please provide the following information:

  • SDK Version:
  • OS type and version:
  • Application Server type and version (if applicable):
  • Using spring-boot?
  • Additional relevant libraries (with version, if applicable):

Logs

Turn on SDK logs and attach/paste them to the issue. If using an application server, also attach any relevant server logs.

Be sure to remove any private information from the logs before posting!

Screenshots

If applicable, add screenshots to help explain your problem.

@itsforbrijesh
Copy link

itsforbrijesh commented Jul 10, 2019

we are also facing this issue, support case created, this is delaying our deployment to production as we wanted to send different instrumentation keys for on premise applications

  1. Create Dynamic Java project and add new servlet
  2. Add code TelemetryConfiguration.getActive().setInstrumentationKey(instrumentationKey);
  3. Remove Instrumentation key from ApplicationInsights.xml
  4. Update web.xml

files.zip

Application Type: Dynamic Web with Servlet (java)
SDK version :2.3.1
OS : Windows 10 laptop
Using Springboot - No
Added all required libraries to enable ApplicationInsights

@cijothomas
Copy link
Author

@trask please update the doc (Please note that Live Metrics does not support reading instrumentation key from code.) that this is supported from newer version of sdk.

@cijothomas
Copy link
Author

@trask
Copy link
Member

trask commented Jul 24, 2019

Thanks @cijothomas, I have created docs PR MicrosoftDocs/azure-docs#35789.

@ghost ghost locked as resolved and limited conversation to collaborators Jul 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants