Azure / Azure/azure-functions-host
AppInsight logs append Azurewebjobs to my connection string which is misleading
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 36
Description
#### Check for a solution in the Azure portal
For issues in production, please check for a solution to common issues in the Azure portal before opening a bug. In the Azure portal, navigate to your function app, select `Diagnose and solve problems` from the left, and view relevant dashboards before opening your issue.
#### Investigative information
For my blob trigger, my storage connection is defined as f6f631_STORAGE in the app setting but the error message appends AzureWebJobs to it when logging.
Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.blob_trigger'. Microsoft.Azure.WebJobs.Extensions.Storage.Blobs: Storage account connection string 'AzureWebJobsf6f631_STORAGE' does not exist. Make sure that it is a defined App Setting.
Please provide the following:
- Timestamp:
- Function App version:
- Function App name: testblobusingeventgrid-copilot
- Function name(s) (as appropriate): blob_trigger
- Invocation ID:
- Region:
#### Repro steps
Provide the steps required to reproduce the problem:
Create blob trigger using Event grid with storage that is separate from Azurewebjobsstorage
deployment failed with some error indexing the storage account for blog trigger
Appinsight logs show misleading connection string
#### Expected behavior
Not append the string "Azurewebjobs" to the storage account app setting string in the logs
#### Actual behavior
AppInsight logs append Azurewebjobs to my connection string which is misleading
#### Known workarounds
#### Related information
```python
import azure.functions as func
import logging
app = func.FunctionApp()
@app.blob_trigger(arg_name="myblob", path="sample-storage",
connection="f6f631_STORAGE",source="EventGrid")
@app.blob_output(arg_name="myoutputblob", path="sample-storage/output.txt", connection="f6f631_STORAGE")
def blob_trigger(myblob:func.InputStream):
logging.info(f"Python blob trigger function processed blob"
f"Name: {myblob.name}"
f"Blob Size: {myblob.length} bytes")
blob_content = myblob.read().decode('utf-8')
print(blob_content)
myoutputblob.set(blob_content)
```
-->
Contributor guide
Research direction
Start by reproducing the blob trigger setup described in the issue, using a storage setting separate from AzureWebJobsStorage and the Python example. Inspect the host's indexing and error-logging path for the connection name; done means the logged setting name matches f6f631_STORAGE without the misleading AzureWebJobs prefix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100