我在 Azure 中创建了一个服务总线队列,并部署了一个 Azure 函数,当新数据添加到队列中时会触发该函数。我在 azure 上还有一个数据库,我在其中存储消息和 Azure 函数中的单独路由
get-all-data
,该函数从数据库获取所有数据。
但是,当我向队列添加新数据时,该函数不会被触发。此外,在
get-all-data
处访问 {auzrefunction-uri}/api/get-all-data
会给出 404
响应。
更新:我并没有真正改变任何东西,但是
get-all-data
HTTP 触发器开始工作。然而,服务总线触发器的问题仍然是相同的。
我正在使用
VS Code
和 Azure 扩展来运行和部署代码。我按照微软的文档做了所有事情。
本地运行后,我的项目中似乎没有找到任何功能:
主要错误消息:
未找到工作职能。尝试公开您的工作类别和方法。如果您使用绑定扩展(例如 Azure 存储、ServiceBus、定时器等),请确保您已在启动代码中调用扩展的注册方法(例如 builder.AddAzureStorage()、builder.AddServiceBus( )、builder.AddTimers() 等)。
更详细的描述:
func start --verbose
Found Python version 3.9.5 (py).
%%%%%%
%%%%%%
@ %%%%%% @
@@ %%%%%% @@
@@@ %%%%%%%%%%% @@@
@@ %%%%%%%%%% @@
@@ %%%% @@
@@ %%% @@
@@ %% @@
%%
%
Azure Functions Core Tools
Core Tools Version: 4.0.4704 Commit hash: N/A (64-bit)
Function Runtime Version: 4.7.3.18953
[2023-12-11T00:22:53.287Z] Building host: startup suppressed: 'False', configuration suppressed: 'False', startup operation id: '319236c6-d816-43f6-a8e4-69d90415285c'
[2023-12-11T00:22:53.295Z] Reading host configuration file 'D:\Books\Labs\Cloud\lab3-func\host.json'
[2023-12-11T00:22:53.299Z] Host configuration file read:
[2023-12-11T00:22:53.300Z] {
[2023-12-11T00:22:53.301Z] "version": "2.0",
[2023-12-11T00:22:53.302Z] "logging": {
[2023-12-11T00:22:53.303Z] "applicationInsights": {
[2023-12-11T00:22:53.304Z] "samplingSettings": {
[2023-12-11T00:22:53.305Z] "isEnabled": true,
[2023-12-11T00:22:53.306Z] "excludedTypes": "Request"
[2023-12-11T00:22:53.307Z] }
[2023-12-11T00:22:53.309Z] }
[2023-12-11T00:22:53.310Z] },
[2023-12-11T00:22:53.311Z] "extensionBundle": {
[2023-12-11T00:22:53.312Z] "id": "Microsoft.Azure.Functions.ExtensionBundle",
[2023-12-11T00:22:53.313Z] "version": "[3.*, 4.0.0)"
[2023-12-11T00:22:53.314Z] }
[2023-12-11T00:22:53.315Z] }
[2023-12-11T00:22:53.341Z] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:java
[2023-12-11T00:22:53.344Z] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:node
[2023-12-11T00:22:53.347Z] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:powershell
[2023-12-11T00:22:53.354Z] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at C:\Users\user\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle
[2023-12-11T00:22:53.358Z] Found a matching extension bundle at C:\Users\user\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle\3.24.0
[2023-12-11T00:22:53.372Z] Loading functions metadata
[2023-12-11T00:22:53.375Z] Reading functions metadata
[2023-12-11T00:22:53.377Z] Reading functions metadata
[2023-12-11T00:22:53.382Z] 0 functions found
[2023-12-11T00:22:53.385Z] 0 functions found
[2023-12-11T00:22:53.389Z] 0 functions loaded
[2023-12-11T00:22:53.391Z] Looking for extension bundle Microsoft.Azure.Functions.ExtensionBundle at C:\Users\user\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle
[2023-12-11T00:22:53.393Z] Found a matching extension bundle at C:\Users\user\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle\3.24.0
[2023-12-11T00:22:53.395Z] Fetching information on versions of extension bundle Microsoft.Azure.Functions.ExtensionBundle available on https://functionscdn.azureedge.net/public/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle/index.json
[2023-12-11T00:22:53.559Z] Skipping bundle download since it already exists at path C:\Users\user\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle\3.24.0
[2023-12-11T00:22:53.564Z] Loading extension bundle from C:\Users\user\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle\3.24.0\bin
[2023-12-11T00:22:53.567Z] Script Startup resetting load context with base path: 'C:\Users\user\.azure-functions-core-tools\Functions\ExtensionBundles\Microsoft.Azure.Functions.ExtensionBundle\3.24.0\bin'.
[2023-12-11T00:22:53.576Z] Reading host configuration file 'D:\Books\Labs\Cloud\lab3-func\host.json'
[2023-12-11T00:22:53.578Z] Host configuration file read:
[2023-12-11T00:22:53.579Z] {
[2023-12-11T00:22:53.580Z] "version": "2.0",
[2023-12-11T00:22:53.581Z] "logging": {
[2023-12-11T00:22:53.583Z] "applicationInsights": {
[2023-12-11T00:22:53.584Z] "samplingSettings": {
[2023-12-11T00:22:53.585Z] "isEnabled": true,
[2023-12-11T00:22:53.586Z] "excludedTypes": "Request"
[2023-12-11T00:22:53.587Z] }
[2023-12-11T00:22:53.587Z] }
[2023-12-11T00:22:53.588Z] },
[2023-12-11T00:22:53.589Z] "extensionBundle": {
[2023-12-11T00:22:53.590Z] "id": "Microsoft.Azure.Functions.ExtensionBundle",
[2023-12-11T00:22:53.591Z] "version": "[3.*, 4.0.0)"
[2023-12-11T00:22:53.593Z] }
[2023-12-11T00:22:53.594Z] }
[2023-12-11T00:22:53.853Z] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:java
[2023-12-11T00:22:53.855Z] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:node
[2023-12-11T00:22:53.857Z] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:powershell
[2023-12-11T00:22:53.954Z] Initializing Warmup Extension.
[2023-12-11T00:22:54.007Z] Initializing Host. OperationId: '319236c6-d816-43f6-a8e4-69d90415285c'.
[2023-12-11T00:22:54.018Z] Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=319236c6-d816-43f6-a8e4-69d90415285c
[2023-12-11T00:22:54.042Z] LoggerFilterOptions
[2023-12-11T00:22:54.043Z] {
[2023-12-11T00:22:54.046Z] "MinLevel": "None",
[2023-12-11T00:22:54.047Z] "Rules": [
[2023-12-11T00:22:54.048Z] {
[2023-12-11T00:22:54.049Z] "ProviderName": null,
[2023-12-11T00:22:54.050Z] "CategoryName": null,
[2023-12-11T00:22:54.051Z] "LogLevel": null,
[2023-12-11T00:22:54.052Z] "Filter": "<AddFilter>b__0"
[2023-12-11T00:22:54.053Z] },
[2023-12-11T00:22:54.054Z] {
[2023-12-11T00:22:54.055Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2023-12-11T00:22:54.056Z] "CategoryName": null,
[2023-12-11T00:22:54.057Z] "LogLevel": "None",
[2023-12-11T00:22:54.058Z] "Filter": null
[2023-12-11T00:22:54.059Z] },
[2023-12-11T00:22:54.061Z] {
[2023-12-11T00:22:54.062Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2023-12-11T00:22:54.063Z] "CategoryName": null,
[2023-12-11T00:22:54.064Z] "LogLevel": null,
[2023-12-11T00:22:54.065Z] "Filter": "<AddFilter>b__0"
[2023-12-11T00:22:54.066Z] },
[2023-12-11T00:22:54.067Z] {
[2023-12-11T00:22:54.068Z] "ProviderName": "Azure.Functions.Cli.Diagnostics.ColoredConsoleLoggerProvider",
[2023-12-11T00:22:54.069Z] "CategoryName": null,
[2023-12-11T00:22:54.071Z] "LogLevel": null,
[2023-12-11T00:22:54.071Z] "Filter": "<AddFilter>b__0"
[2023-12-11T00:22:54.072Z] }
[2023-12-11T00:22:54.073Z] ]
[2023-12-11T00:22:54.074Z] }
[2023-12-11T00:22:54.076Z] LoggerFilterOptions
[2023-12-11T00:22:54.077Z] {
[2023-12-11T00:22:54.078Z] "MinLevel": "None",
[2023-12-11T00:22:54.080Z] "Rules": [
[2023-12-11T00:22:54.081Z] {
[2023-12-11T00:22:54.082Z] "ProviderName": null,
[2023-12-11T00:22:54.083Z] "CategoryName": null,
[2023-12-11T00:22:54.084Z] "LogLevel": null,
[2023-12-11T00:22:54.085Z] "Filter": "<AddFilter>b__0"
[2023-12-11T00:22:54.086Z] },
[2023-12-11T00:22:54.087Z] {
[2023-12-11T00:22:54.088Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2023-12-11T00:22:54.089Z] "CategoryName": null,
[2023-12-11T00:22:54.090Z] "LogLevel": "None",
[2023-12-11T00:22:54.091Z] "Filter": null
[2023-12-11T00:22:54.092Z] },
[2023-12-11T00:22:54.093Z] {
[2023-12-11T00:22:54.095Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[2023-12-11T00:22:54.096Z] "CategoryName": null,
[2023-12-11T00:22:54.097Z] "LogLevel": null,
[2023-12-11T00:22:54.098Z] "Filter": "<AddFilter>b__0"
[2023-12-11T00:22:54.099Z] },
[2023-12-11T00:22:54.100Z] {
[2023-12-11T00:22:54.101Z] "ProviderName": "Azure.Functions.Cli.Diagnostics.ColoredConsoleLoggerProvider",
[2023-12-11T00:22:54.102Z] "CategoryName": null,
[2023-12-11T00:22:54.103Z] "LogLevel": null,
[2023-12-11T00:22:54.104Z] "Filter": "<AddFilter>b__0"
[2023-12-11T00:22:54.105Z] }
[2023-12-11T00:22:54.106Z] ]
[2023-12-11T00:22:54.107Z] }
[2023-12-11T00:22:54.108Z] ConcurrencyOptions
[2023-12-11T00:22:54.109Z] {
[2023-12-11T00:22:54.110Z] "DynamicConcurrencyEnabled": false,
[2023-12-11T00:22:54.112Z] "MaximumFunctionConcurrency": 500,
[2023-12-11T00:22:54.113Z] "CPUThreshold": 0.8,
[2023-12-11T00:22:54.114Z] "SnapshotPersistenceEnabled": true
[2023-12-11T00:22:54.115Z] }
[2023-12-11T00:22:54.116Z] FunctionResultAggregatorOptions
[2023-12-11T00:22:54.117Z] {
[2023-12-11T00:22:54.118Z] "BatchSize": 1000,
[2023-12-11T00:22:54.119Z] "FlushTimeout": "00:00:30",
[2023-12-11T00:22:54.120Z] "IsEnabled": true
[2023-12-11T00:22:54.121Z] }
[2023-12-11T00:22:54.122Z] SingletonOptions
[2023-12-11T00:22:54.123Z] {
[2023-12-11T00:22:54.124Z] "LockPeriod": "00:00:15",
[2023-12-11T00:22:54.125Z] "ListenerLockPeriod": "00:00:15",
[2023-12-11T00:22:54.126Z] "LockAcquisitionTimeout": "10675199.02:48:05.4775807",
[2023-12-11T00:22:54.127Z] "LockAcquisitionPollingInterval": "00:00:05",
[2023-12-11T00:22:54.128Z] "ListenerLockRecoveryPollingInterval": "00:01:00"
[2023-12-11T00:22:54.129Z] }
[2023-12-11T00:22:54.132Z] Starting JobHost
[2023-12-11T00:22:54.136Z] Starting Host (HostId=desktopjcuvdfa-1433332689, InstanceId=c16617d5-921b-4758-a9c6-dca27fe2e074, Version=4.7.3.18953, ProcessId=9472, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=(null))
[2023-12-11T00:22:54.141Z] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:java
[2023-12-11T00:22:54.143Z] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:node
[2023-12-11T00:22:54.145Z] FUNCTIONS_WORKER_RUNTIME set to python. Skipping WorkerConfig for language:powershell
[2023-12-11T00:22:54.158Z] Loading functions metadata
[2023-12-11T00:22:54.160Z] Reading functions metadata
[2023-12-11T00:22:54.161Z] Reading functions metadata
[2023-12-11T00:22:54.163Z] 0 functions found
[2023-12-11T00:22:54.164Z] 0 functions found
[2023-12-11T00:22:54.172Z] 0 functions loaded
[2023-12-11T00:22:54.192Z] Generating 0 job function(s)
[2023-12-11T00:22:54.212Z] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
[2023-12-11T00:22:54.221Z] HttpOptions
[2023-12-11T00:22:54.222Z] Initializing function HTTP routes
[2023-12-11T00:22:54.223Z] {
[2023-12-11T00:22:54.224Z] No HTTP routes mapped
[2023-12-11T00:22:54.226Z]
[2023-12-11T00:22:54.225Z] "DynamicThrottlesEnabled": false,
[2023-12-11T00:22:54.228Z] "EnableChunkedRequestBinding": false,
[2023-12-11T00:22:54.229Z] "MaxConcurrentRequests": -1,
[2023-12-11T00:22:54.230Z] "MaxOutstandingRequests": -1,
[2023-12-11T00:22:54.231Z] "RoutePrefix": "api"
[2023-12-11T00:22:54.233Z] }
[2023-12-11T00:22:54.235Z] Host initialized (87ms)
[2023-12-11T00:22:54.238Z] Host started (98ms)
[2023-12-11T00:22:54.239Z] Job host started
[2023-12-11T00:22:59.063Z] Host lock lease acquired by instance ID '0000000000000000000000003014F25D'.
这是我在
function_app.py
的职能:
import azure.functions as func
import mysql.connector
import logging
import json
from datetime import datetime
app = func.FunctionApp()
@app.function_name(name="my-function")
@app.service_bus_queue_trigger(arg_name="azservicebus", queue_name="my-sb-queue",
connection="sb://name.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=someRandomKeyLetters=")
def servicebus_queue_trigger(azservicebus: func.ServiceBusMessage):
logging.info('Python ServiceBus Queue trigger processed a message: %s',
azservicebus.get_body().decode('utf-8'))
try:
message_body = azservicebus.get_body().decode('utf-8')
conn = mysql.connector.connect(user="user", password="pwd", host="db-name.mysql.database.azure.com", port=3306, database="sensors")
cursor = conn.cursor()
# Extract data from the message
sensor_type = message_body['sensor_type']
location = message_body['location']
date = message_body['date']
property_value = message_body['property']
# Convert date string to datetime object
date_obj = datetime.strptime(date, '%Y-%m-%d')
# Insert data into the database
insert_query = (
"INSERT INTO sensor_data (sensor_type, location, date, property) VALUES (%s, %s, %s, %s)"
)
insert_values = (sensor_type, location, date_obj, property_value)
cursor.execute(insert_query, insert_values)
conn.commit()
# Close the database connection
cursor.close()
conn.close()
except Exception as e:
print(f"An error occurred: {str(e)}")
@app.route(route="get-all-data", auth_level=func.AuthLevel.ANONYMOUS)
def get_all_data(req: func.HttpRequest) -> func.HttpResponse:
try:
conn = mysql.connector.connect(user="user", password="pwd", host="db-name.mysql.database.azure.com", port=3306, database="sensors")
cursor = conn.cursor()
# Select all data from the database
query = "SELECT * FROM sensor_data"
cursor.execute(query)
rows = cursor.fetchall()
# Close the database connection
cursor.close()
conn.close()
# Convert database rows to a list of dictionaries
data = []
for row in rows:
entry = {
'id': row[0],
'sensor_type': row[1],
'location': row[2],
'date': row[3].strftime("%Y-%m-%d"),
'property': row[4]
}
data.append(entry)
# Return the data as an HTTP response
return func.HttpResponse(json.dumps(data), mimetype="application/json", status_code=200)
except Exception as e:
return func.HttpResponse(f"An error occurred: {str(e)}", status_code=500)
我的
host.json
:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.*, 4.0.0)"
}
}
我的
local.settings.json
:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "",
"FUNCTIONS_WORKER_RUNTIME": "python",
"AzureWebJobsFeatureFlags": "EnableWorkerIndexing"
}
}
将
Azure function core tools
升级到最新版本。您可以从这里下载。
我有
Azure function core tools
版本 4.0.5455
并在 "version": "[4.*, 5.0.0)"
中使用 host.json
。
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.*, 5.0.0)"
我使用了对我有用的代码。
function_app.py
:
from datetime import datetime
import json
import azure.functions as func
import logging
import mysql.connector
app = func.FunctionApp()
@app.function_name(name="function")
@app.service_bus_queue_trigger(arg_name="azservicebus", queue_name="sbqueue",
connection="ServiceBusConnectionString")
def servicebus_queue_trigger(azservicebus: func.ServiceBusMessage):
logging.info('Python ServiceBus Queue trigger processed a message: %s',
azservicebus.get_body().decode('utf-8'))
try:
message_body = azservicebus.get_body().decode('utf-8')
conn = mysql.connector.connect(user="user", password="password", host="mysbsqlserver.mysql.database.azure.com", database="mysqldatabase", port=3306)
cursor = conn.cursor()
# Extract data from the message
sensor_type = json.loads(message_body)['sensor_type']
location = json.loads(message_body)['location']
date = json.loads(message_body)['date']
property_value = json.loads(message_body)['property']
# Convert date string to datetime object
date_obj = datetime.strptime(date, '%Y-%m-%d')
# Insert data into the database
insert_query = (
"INSERT INTO sensor_data (sensor_type, location, date, property) VALUES (%s, %s, %s, %s)"
)
insert_values = (sensor_type, location, date_obj, property_value)
cursor.execute(insert_query, insert_values)
conn.commit()
# Close the database connection
cursor.close()
conn.close()
except Exception as e:
print(f"An error occurred: {str(e)}")
@app.route(route="http_trigger", auth_level=func.AuthLevel.ANONYMOUS)
def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.')
try:
conn = mysql.connector.connect(user="user", password="password", host="mysbsqlserver.mysql.database.azure.com", database="mysqldatabase", port=3306)
cursor = conn.cursor()
# Select all data from the database
query = "SELECT * FROM sensor_data"
cursor.execute(query)
rows = cursor.fetchall()
# Close the database connection
cursor.close()
conn.close()
# Convert database rows to a list of dictionaries
data = []
for row in rows:
entry = {
'sensor_type': row[0],
'location': row[1],
'date': row[2].strftime("%Y-%m-%d"),
'property': row[3]
}
data.append(entry)
# Return the data as an HTTP response
return func.HttpResponse(json.dumps(data), mimetype="application/json", status_code=200)
except Exception as e:
return func.HttpResponse(f"An error occurred: {str(e)}", status_code=500)
local.settings.json
:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "python",
"AzureWebJobsFeatureFlags": "EnableWorkerIndexing",
"ServiceBusConnectionString": "Endpoint=sb://sbtriggerbus.servicebus.windows.net/;SharedAccessKeyName=xxxx;SharedAccessKey=xxxxxx"
}
}
host.json
:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.*, 5.0.0)"
}
}
OUTPUT
:
sample message
:
{
"sensor_type": "Temperature",
"location": "Room1",
"date": "2023-12-11",
"property": "22.5"
}
Azure Functions Core Tools
Core Tools Version: 4.0.5455 Commit hash: N/A (64-bit)
Function Runtime Version: 4.27.5.21554
[2023-12-11T07:37:50.503Z] Customer packages not in sys path. This should never happen!
[2023-12-11T07:37:56.429Z] 0.04s - Debugger warning: It seems that frozen modules are being used, which may
[2023-12-11T07:37:56.434Z] 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
[2023-12-11T07:37:56.438Z] 0.00s - to python to disable frozen modules.
[2023-12-11T07:37:56.442Z] 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[2023-12-11T07:37:56.802Z] Worker process started and initialized.
Functions:
http_trigger: http://localhost:7071/api/http_trigger
function: serviceBusTrigger
For detailed output, run func with --verbose flag.
[2023-12-11T07:38:02.928Z] Executing 'Functions.function' (Reason='(null)', Id=e4bf05af-0063-41d4-938c-34dd9d137445)
[2023-12-11T07:38:02.935Z] Trigger Details: MessageId: e91b40c62e464d24bd45bcf049ed913c, SequenceNumber: 19, DeliveryCount: 1, EnqueuedTimeUtc: 2023-12-11T07:38:02.5330000+00:00, LockedUntilUtc: 2023-12-11T07:39:02.5640000+00:00, SessionId: (null)
[2023-12-11T07:38:03.214Z] Python ServiceBus Queue trigger processed a message: {
[2023-12-11T07:38:03.220Z] "sensor_type": "Temperature",
[2023-12-11T07:38:03.224Z] "location": "Room1",
[2023-12-11T07:38:03.228Z] "date": "2023-12-11",
[2023-12-11T07:38:03.232Z] "property": "22.5"
[2023-12-11T07:38:03.236Z] }
[2023-12-11T07:38:06.972Z] Executed 'Functions.function' (Succeeded, Id=e4bf05af-0063-41d4-938c-34dd9d137445, Duration=4055ms)
[2023-12-11T07:38:16.644Z] Executing 'Functions.http_trigger' (Reason='This function was programmatically called via the host APIs.', Id=72fa1b5e-8c64-4433-a2c5-e9c3301a38f4)
[2023-12-11T07:38:16.667Z] Python HTTP trigger function processed a request.
[2023-12-11T07:38:19.815Z] Executed 'Functions.http_trigger' (Succeeded, Id=72fa1b5e-8c64-4433-a2c5-e9c3301a38f4, Duration=3179ms)
http_trigger output
:
[
{
"sensor_type": "Temperature",
"location": "Room1",
"date": "2023-12-11",
"property": "22.5"
}
]