Validate instrumentation key in Azure Exporters#789
Validate instrumentation key in Azure Exporters#789lzchen merged 14 commits intocensus-instrumentation:masterfrom
Conversation
contrib/opencensus-ext-azure/opencensus/ext/azure/common/__init__.py
Outdated
Show resolved
Hide resolved
contrib/opencensus-ext-azure/opencensus/ext/azure/common/__init__.py
Outdated
Show resolved
Hide resolved
contrib/opencensus-ext-azure/opencensus/ext/azure/log_exporter/__init__.py
Outdated
Show resolved
Hide resolved
contrib/opencensus-ext-azure/opencensus/ext/azure/common/__init__.py
Outdated
Show resolved
Hide resolved
contrib/opencensus-ext-azure/opencensus/ext/azure/common/utils.py
Outdated
Show resolved
Hide resolved
contrib/opencensus-ext-azure/opencensus/ext/azure/common/utils.py
Outdated
Show resolved
Hide resolved
contrib/opencensus-ext-azure/opencensus/ext/azure/common/utils.py
Outdated
Show resolved
Hide resolved
contrib/opencensus-ext-azure/opencensus/ext/azure/log_exporter/__init__.py
Show resolved
Hide resolved
|
@reyang |
| return urlparse(url).netloc | ||
|
|
||
|
|
||
| # Validate UUID format |
There was a problem hiding this comment.
Why do we want UUID format link here?
We should have a link to the definition of "what's a valid instrumentation key for Azure Monitor".
There was a problem hiding this comment.
I don't believe there is an official definition of "what's a valid instrumentation key for Azure Monitor". The links that Mothra had referred to (with the prefix and suffix) do not seem to apply to the ikeys that are sent to Azure Monitor, so we decided that the validation would be to check for UUID. With that being said, I will supplement the links in the comments with more detail on explaining what it means to be a valid instrumentation key.
contrib/opencensus-ext-azure/opencensus/ext/azure/common/utils.py
Outdated
Show resolved
Hide resolved
reyang
left a comment
There was a problem hiding this comment.
I approve assuming all my comments will be properly addressed.
Azure exporters will now throw an exception upon passing in an invalid instrumentation key.
The definition of a VALID instrumentation key is as follows: