Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

feat: Allow custom app insights instrumentation key #494

Merged
merged 2 commits into from
Aug 28, 2020

Conversation

tbarlow12
Copy link
Contributor

What did you implement:

Enable custom app insights instrumentation key

provider:
  appInsights:
    instrumentationKey: {your_key}

How did you implement it:

If an instrumentation key is added, arm template will use that value instead of the key from the generated template

Out of scope: The default template will still create an instance of app insights - should be future PR to remove that

How can we verify it:

Deploy a function app with a custom app insights instrumentation key

Todos:

Note: Run npm run test:ci to run all validation checks on proposed changes

  • Ensure there are no lint errors.
    Validate via npm run lint
    Note: Some reported issues can be automatically fixed by running npm run lint:fix
  • Write tests and confirm existing functionality is not broken.
    Validate via npm test
  • Write documentation
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

Copy link
Contributor

@wbreza wbreza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I would like to see a unit test to validate this change before merging.

@@ -221,7 +224,7 @@ export class FunctionAppResource implements ArmResourceTemplateGenerator {
},
{
name: "APPINSIGHTS_INSTRUMENTATIONKEY",
value: "[reference(concat('microsoft.insights/components/', parameters('appInsightsName'))).InstrumentationKey]"
value: instrumentationKey || "[reference(concat('microsoft.insights/components/', parameters('appInsightsName'))).InstrumentationKey]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit test to validate this change?

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 this pull request may close these issues.

2 participants