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

Telemetry configuration broken in runtime #2915

Closed
garypretty opened this issue May 6, 2020 · 4 comments
Closed

Telemetry configuration broken in runtime #2915

garypretty opened this issue May 6, 2020 · 4 comments
Assignees
Labels
Type: Bug Something isn't working

Comments

@garypretty
Copy link
Contributor

Some changes to the runtime have broken the telemetry configuration.

  • IBotTelemetryClient is no longer registered for DI
  • The TelemetryInitializerMiddleware is never added to the adapter pipeline

I have a fix ready to PR for this - will raise the PR once this issue is opened.

@benbrown
Copy link
Contributor

benbrown commented May 6, 2020

@luhan2017 Can you also help verify that this is properly using the applicationInsights.InstrumentationKey field in the configuration?

@zidaneymar
Copy link
Contributor

@luhan2017 Can you also help verify that this is properly using the applicationInsights.InstrumentationKey field in the configuration?

based on this documentation, the InstrumentationKey will be used in 'AddApplicationInsightsTelemetry',

image

@garypretty
Copy link
Contributor Author

garypretty commented May 7, 2020

The issue here is not that the Instrumentation Key is not used. If you eject the bot and the key is populated in the appSetting.json file, then this is used and works as expected. The behavior I am seeing is that if you populate the instrumentation key in settings via the composer UI and run the bot in a hosted fashion (i.e. the setting is populated in '\plugins\localPublish\hostedBots\XXXXXX\settings\appSettings.json', but it is blank in '\plugins\localPublish\hostedBots\59451.85293451945\runtime\azurewebapp\appSettings.json') then the telemetry is not logged correctly.

I am assuming the issue here is somewhere in how we are using multiple config files in the hosted scenario and how they play together.

@zidaneymar Issue resolved - see comment below.

@hibrenda hibrenda added Needs investigation and removed Needs-triage A new issue that require triage labels May 7, 2020
@hibrenda hibrenda assigned zidaneymar and unassigned boydc2014 May 7, 2020
@garypretty
Copy link
Contributor Author

FYI - I got to the bottom of this and make an additional change in the related PR.

The overloaded configuration file is working correctly, but the overridden instrumentation key was not being respected by the AddBotApplicationInsights method. I have now amended the runtime code to pass this into the extension method explicitly. Once you do this, everything works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants