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

Error while creating continuous export of azure log to storage using powershell command #18350

Closed
MusthaqAli123 opened this issue May 31, 2022 · 3 comments · Fixed by #18668 or #18756
Closed
Assignees
Labels
customer-reported Monitor - ApplicationInsights question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@MusthaqAli123
Copy link

Description

I am trying to create ContinuousExport for Azure Application Insights Logs to Storage Container using Powershell cmd, but I am getting below error
continuousexport_bug
New-AzApplicationInsightsContinuousExport: Exception calling "Join" with "2" argument(s): "Value cannot be null. (Parameter 'values')"

Issue script & Debug output

$contextmobile = New-AzureStorageContext -StorageAccountName "name" -StorageAccountKey "key1"
$sastokenmobile = New-AzStorageContainerSASToken -Name "name" -Context $contextmobile -ExpiryTime (Get-Date).AddYears(50) -Permission w
$sasurimobile = "http" + $sastokenmobile
New-AzApplicationInsightsContinuousExport -ResourceGroupName "name" -Name "name" -DocumentType "Custom Event" -StorageAccountId "storageaccid" -StorageLocation  -StorageSASUri $sasurimobile

Environment data

New-AzApplicationInsightsContinuousExport: Exception calling "Join" with "2" argument(s): "Value cannot be null. (Parameter 'values')"

Module versions

New-AzApplicationInsightsContinuousExport

Error output

HistoryId: -1

Message        : Exception calling "Join" with "2" argument(s): "Value cannot be null. (Parameter 'values')"
StackTrace     :    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
                    at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
                    at System.Management.Automation.PSScriptCmdlet.DoProcessRecord()
                    at System.Management.Automation.CommandProcessor.ProcessRecord()
Exception      : System.Management.Automation.MethodInvocationException
InvocationInfo : {}
Line           :         $PSBoundParameters['RecordType'] = [System.String]::Join(",", $PSBoundParameters['DocumentType'])
                 
Position       : At /usr/local/share/powershell/Modules/Az.ApplicationInsights/2.0.0/custom/New-AzApplicationInsightsContinuousExport.ps1:157 char:9
                 +         $PSBoundParameters['RecordType'] = [System.String]::Join(",",+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

Message        : Value cannot be null. (Parameter 'values')
StackTrace     :    at System.String.JoinCore(ReadOnlySpan`1 separator, Object[] values)
                    at CallSite.Target(Closure , CallSite , Type , String , Object )
Exception      : System.ArgumentNullException
InvocationInfo : {}
Line           :         $PSBoundParameters['RecordType'] = [System.String]::Join(",", $PSBoundParameters['DocumentType'])
                 
Position       : At /usr/local/share/powershell/Modules/Az.ApplicationInsights/2.0.0/custom/New-AzApplicationInsightsContinuousExport.ps1:157 char:9
                 +         $PSBoundParameters['RecordType'] = [System.String]::Join(",",+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1
@MusthaqAli123 MusthaqAli123 added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 31, 2022
@ghost ghost added customer-reported and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 31, 2022
@dingmeng-xue dingmeng-xue added Monitor - ApplicationInsights question The issue doesn't require a change to the product in order to be resolved. Most issues start as that and removed bug This issue requires a change to an existing behavior in the product in order to be resolved. labels Jun 1, 2022
@dingmeng-xue
Copy link
Member

Thanks for reporting. Please check your script. I believe you need to provide value following -StorageLocation.

@dingmeng-xue dingmeng-xue added the needs-author-feedback More information is needed from author to address the issue. label Jun 1, 2022
@MusthaqAli123
Copy link
Author

I provided that as well, You can see it in my screenshot attached

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels Jun 1, 2022
@dingmeng-xue dingmeng-xue removed the needs-team-attention This issue needs attention from Azure service team or SDK team label Jun 3, 2022
@dingmeng-xue
Copy link
Member

@VeryEarly , please look into this questions. Is there problem we introduced when we upgrade ApplicationInsights this time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Monitor - ApplicationInsights question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
3 participants