-
Notifications
You must be signed in to change notification settings - Fork 199
add the ability to configure app-insights export #102
Conversation
if container_name not in [x["name"] for x in client.list_containers()]: | ||
client.create_container(container_name) | ||
|
||
expiry = datetime.utcnow() + timedelta(days=2 * 365) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we accomplish this with something other than an ad hoc (thus irrevocable) SAS URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively: use a much shorter-lived URL, and have a mechanism for refreshing within an instance (though that feels a bit roundabout).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API unfortunately requires SAS urls.
Doing it through the instance requires granting more privileges to the service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Given the restrictions on perms, and the fact that none of our code touches it (it is only given directly to an Azure API, here), this seems okay to me. Can we just document our usage assumptions? In particular, note that this SAS URL must not "leave this script", except to the extent that it implicitly does in its use in the export request.
Summary of the Pull Request
Adds the ability to enable automatic log export from the instance specific appinsights
PR Checklist
Info on Pull Request
Adds the
--export_appinsights
to the deployment script to setup app insight exports to theapp-insights
container on thefunc
storage account. Note, it will automatically replace any existing app-insights exports to the same container prior to creating the export config.Validation Steps Performed
Deploy with
--export_appinsights
, run for a while. Note new files are created inapp-insights
container onfunc
storage account.