Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Appinsight reporting #157

Open
mrmasterplan opened this issue Sep 14, 2022 · 1 comment
Open

Appinsight reporting #157

mrmasterplan opened this issue Sep 14, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@mrmasterplan
Copy link
Contributor

Set up a class that takes as its one parameter the instrumentation key of an azure app insight.

https://docs.microsoft.com/en-us/azure/azure-monitor/app/opencensus-python

You can use the snippets from here to set up the app-insights and get that key:

https://github.com/atc-net/atc-snippets/tree/main/azure-cli/monitor

The new class, maybe named AtcInsightsReporter, should take any arguments that are serializable, to json, and add them as properties to a log entry that is sent to the appinsights. Importantly, the class should use the job introspection available in atc-dataplatform to also add a link to the correct workspace and job-run, so that one can find the way back to the line that caused the log.

The class should be usable as a context manager, where it catches all exceptions and reports them to log analytics.
This will allow for developer attention, while also letting the job run to successful completion.

@mrmasterplan mrmasterplan added the enhancement New feature or request label Sep 14, 2022
@mrmasterplan
Copy link
Contributor Author

mrmasterplan commented Sep 14, 2022

I have started working on this in the branch feature/insights-reporter if anyone is interested in collaborating.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant