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

[functionapp] add support for app insights #7890 #8081

Merged
merged 1 commit into from
Jan 16, 2019

Conversation

ankitkumarr
Copy link
Contributor

Currently, azure-cli does not support creation or management of app insights. Therefore, there was no simple way to delete the App insights directly created by my tests. Would this be OK or should I look into other ways of deleting the App Insights created by tests (maybe by deleting the resource group, or using appinsights-sdk)

/cc @ahmedelnably @ahmelsayed @panchagnula


This checklist is used to make sure that common guidelines for a pull request are followed.

  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

@ankitkumarr ankitkumarr force-pushed the ankikuma-app-insights branch 3 times, most recently from fea526a to ec2cd92 Compare December 17, 2018 23:42
@@ -363,6 +363,13 @@ def load_arguments(self, _):
help="Geographic location where Function App will be hosted. Use 'functionapp list-consumption-locations' to view available locations.")
c.argument('runtime', help='The functions runtime stack.', arg_type=get_enum_type(set(LINUX_RUNTIMES).union(set(WINDOWS_RUNTIMES))))
c.argument('os_type', arg_type=get_enum_type(OS_TYPES), help="Set the OS type for the app to be created.")
c.argument('create_app_insights', arg_type=get_three_state_flag(return_label=True), help="Creates a new App Insights and adds to the new Function app. Needs --app-insights-location.")
Copy link
Contributor

@yugangw-msft yugangw-msft Dec 21, 2018

Choose a reason for hiding this comment

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

This is a bit too much to expose 5 more arguments for just one scenario support.
I would much prefer you just author a command of az appinsights create (you can put it inside the appservice module for the time being), and let functionapp create take an argument to point to an existing appinsights resource.
CLI community are asking for app insights support for a long while, why not start to make contributions here to help other users?
Once the command is in, we can further add a few more to make CRUD complete. For reference, check out #5543

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yugangw-msft, that makes sense. If people have been asking for support, I don't mind making this into a global az appinsights. I might also be nice to confirm with the app insights team, just so I don't end up duplicating work.
\cc @ahmedelnably @ahmelsayed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ahmedelnably, if we have a global az appinsights create, would we still need to add support for users to create appinsights using az functionapp create, or could we just allow users to provide an exisiting appinsights (which they can create az appinsights create, and make the functionapp point to that? Just like we do with storage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yugangw-msft, on offline discussion with my team as well as the AppInsights team, we decided that I should not make az appinsights to avoid ownership and maintenance issues. Appinsights team do have this work in their backlog, so they should be able to take care of that. Just wanted to post an update here.

I still need to update this PR to avoid introducing the new args.

@ankitkumarr ankitkumarr force-pushed the ankikuma-app-insights branch 2 times, most recently from 70470d3 to 41ad145 Compare January 11, 2019 22:34
@ankitkumarr
Copy link
Contributor Author

The PR is updated. As per offline discussion, az functionapp create will accept App Insights and Instrumentation key, but not create them.

@yugangw-msft
Copy link
Contributor

We have a new release today, can you update the history.rst to start with a new version?

@ankitkumarr ankitkumarr force-pushed the ankikuma-app-insights branch from 41ad145 to 68147a9 Compare January 12, 2019 01:38
@ankitkumarr
Copy link
Contributor Author

@yugangw-msft, I just updated it.

@panchagnula
Copy link
Contributor

@yugangw-msft
Copy link
Contributor

yugangw-msft commented Jan 12, 2019

@panchagnula @ankitkumarr , updating setup.py is no longer needed :), thanks for the improvement made by @tjprescott recently.

Travis, what is the right header we should put in the history.rst?

@tjprescott
Copy link
Member

tjprescott commented Jan 14, 2019

@yugangw-msft they can simply append the HISTORY entry to the one at the top. During release, we can easily tell which entries need to be lifted into the next version bump.

@ankitkumarr
Copy link
Contributor Author

ankitkumarr commented Jan 14, 2019

@tjprescott, do you mean I should not create a new version entry in the HISTORY.rst and just append to the one that's already there (even if it's already released)? Apologies if I misunderstood you.

EDIT:
I updated the PR with the right history entry.

@ankitkumarr ankitkumarr force-pushed the ankikuma-app-insights branch from 68147a9 to f6e3c3c Compare January 15, 2019 18:02
@ankitkumarr ankitkumarr force-pushed the ankikuma-app-insights branch from f6e3c3c to af057fa Compare January 15, 2019 18:09
@panchagnula panchagnula added this to the Sprint 53 milestone Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants