1

I'm with error's in live telemetry from azure functions.

My functions has as bin'ds Event Hub Trigger as IN and Blob as OUT. I mean, i wanna read datas in event hub and stream this to blob as file.

My Bindings:

Note, in the path to blob, i created a {rand-guid} parameter to create a file for call with a guid

{
  "scriptFile": "__init__.py",
  "bindings": [
    {
      "type": "eventHubTrigger",
      "name": "event",
      "direction": "in",
      "eventHubName": "myEventHUB",
      "connection": "String",
      "cardinality": "one",
      "consumerGroup": "group1",
      "dataType": "binary"
    },
    {
      "type": "blob",
      "direction": "out",
      "name": "outputBlob",
      "path": "mypath/{rand-guid}.json",
      "connection": "myStringconnectiontoblob"
    }
  ]

}

My main.py function is:

import logging
import azure.functions as func

#from azure.storage.blob import BlobServiceClient

def main(event: func.EventHubEvent, outputBlob: func.Out[func.InputStream]):



    data = event.get_body().decode('utf-8')

    outputBlob.set(data)
    outputBlob: func.Out[str]

The dependency error:

My Function do your work, read the event hub and its writing data's in blob, but when i see the live telemety log, i'm receving a error 404 HEAD for all files Writed in blob.

Maybe this error its happens because i set the {rand-guid} in the output path, and when the function try check if the file exists, its dont exists. After, the function do the creation of blob file, because this is writed normally in blob.

The Log Line is like

dependency | log level: INFO | HEAD | 404 .........

Telemetry Activity error

I appreciate your comment or answer to help me

Thanks

0

1 Answer 1

1

I test your code with my Event Hub and Storage account, and see the same issue. I agree with your consideration by searching in this troubleshooting site.

Occurs if a container or blob has been deleted by another client before this request.

Occurs if you are using an API call that creates the container or blob after checking whether it exists. The CreateIfNotExists APIs make a HEAD call first to check for the existence of the container or blob; if it does not exist, a 404 error is returned, and then a second PUT call is made to write the container or blob.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.