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

PromptFlow Tracing results not visible on Azure AI Foundry #3950

Open
Hironsan opened this issue Feb 7, 2025 · 2 comments
Open

PromptFlow Tracing results not visible on Azure AI Foundry #3950

Hironsan opened this issue Feb 7, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Hironsan
Copy link

Hironsan commented Feb 7, 2025

Describe the bug
I cannot view the tracing results of PromptFlow on Azure AI Foundry.

How To Reproduce the bug
Run the following commands(ref):

az login
pf config set trace.destination=azureml://subscriptions/<your_subscription_id>/resourcegroups/<your_resourcegroup_name>/providers/Microsoft.MachineLearningServices/workspaces/<your_studio_project_name>

Set environment variable:

PF_DISABLE_TRACING=false

The minimal code is as follows:

import os

from dotenv import load_dotenv
from openai import AzureOpenAI
from promptflow.tracing import start_trace

load_dotenv()
start_trace()

client = AzureOpenAI(
    azure_endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT"),
    api_key=os.environ.get("AZURE_OPENAI_API_KEY"),
    api_version=os.environ.get("AZURE_OPENAI_API_VERSION"),
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello"}
    ]
)

The output is as follows:

You can view the trace detail from the following URL:
http://127.0.0.1:23333/v1.0/ui/traces/?#collection=backend&uiTraceId=[trace_id]
https://ai.azure.com/projecttrace/detail/[trace_id]?wsid=/subscriptions/[subscription_id]/resourceGroups/[resource_group_name]/providers/Microsoft.MachineLearningServices/workspaces/[project_name]

When selecting the local URL, the tracing result is displayed correctly as shown below:

Image

When selecting the remote URL, the tracing result isn’t displayed:

Image

Expected behavior
The result is displayed the same way as on the local one.

Running Information(please complete the following information):

  • Promptflow Package Version using pf -v: 1.17.2
    • promptflow==1.17.2
    • promptflow-azure==1.17.2
    • promptflow-core==1.17.2
    • promptflow-devkit==1.17.2
    • promptflow-tracing==1.17.2
  • Operating System: Windows 11
  • Python Version using python --version: 3.10.11

Additional context

  • Interestingly, the URL from the console is ai.azure.com/projecttrace, whereas the URL accessed when selecting "Trace" in Azure AI Foundry is ai.azure.com/tracing.
  • Additionally, the official documentation references ml.azure.com instead of ai.azure.com and Azure ML Studio instead of Azure AI Foundry.
@Hironsan Hironsan added the bug Something isn't working label Feb 7, 2025
Copy link

Hi, we're sending this friendly reminder because we haven't heard back from you in 30 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 7 days of this comment, the issue will be automatically closed. Thank you!

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue/pull request label Mar 17, 2025
@pback-ores
Copy link

Same issue here.

@github-actions github-actions bot removed the no-recent-activity There has been no recent activity on this issue/pull request label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants