microsoft / promptflow

Build high-quality LLM apps - from prototyping, testing to production deployment and monitoring.
https://microsoft.github.io/promptflow/
MIT License
8.7k stars 781 forks source link

Invalid instrumentation key #3373

Open tyler-suard-parker opened 1 month ago

tyler-suard-parker commented 1 month ago

Describe the bug

I am following this tutorial: https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/how-to-trace-local-sdk?view=azureml-api-2&tabs=python

I logged in using azure cli and then entered the command to set up my trace destination: pf config set trace.destination=azureml://subscriptions//resourcegroups//providers/Microsoft.MachineLearningServices/workspaces//

This created a CosmosDB. I promptflow does not do this every time I run it on different machines.

I tried to send traces using the trace-autogen-groupchat.ipynb, and I got this error:

ERROR:opencensus.ext.azure.common.transport:Non-retryable server side error 400: {"itemsReceived":2,"itemsAccepted":0,"appId":null,"errors":[{"index":0,"statusCode":400,"message":"Invalid instrumentation key"},{"index":1,"statusCode":400,"message":"Invalid instrumentation key"}]}. ERROR:opencensus.ext.azure.common.transport:Non-retryable server side error 400: {"itemsReceived":1,"itemsAccepted":0,"appId":null,"errors":[{"index":0,"statusCode":400,"message":"Invalid instrumentation key"}]}.

How To Reproduce the bug Steps to reproduce the behavior, how frequent can you experience the bug:

  1. Download the trace-autogen-groupchat.ipynb notebook from this repo
  2. Follow the instructions for setting the trace destination https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/how-to-trace-local-sdk?view=azureml-api-2&tabs=python
  3. Try to run the code in the autogen section, where agents generate messages and send them using tracing.

Expected behavior I expected the information to be sent without any error.

Using Windows, Python 11, and the latest version of PromptFlow.

zhengfeiwang commented 4 weeks ago

Hi @tyler-suard-parker , thank you for reaching out. I think there are several questions in this issue: