Skip to content

Remove package function enable_telemetry() #41609

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

dargilco
Copy link
Member

@dargilco dargilco commented Jun 17, 2025

Description

  • Remove package function enable_telemetry(). Move all relevant code that was in this function to the samples.
  • Update sample code in the /inference folder:
    • Create two sub-folders, one named /azure-openai and the other /azure-ai-inference
    • Samples that show how to get an authenticated AzureOpenAI client from Projects SDK, and do inferencing, have moved to the /azure-openai sub-folder.
    • Samples that show how to do inferencing with an azure-ai-inference client were moved to the /azure-ai-inference sub-folder.

Issues in \sdk\ai\azure-ai-projects\samples\inference\azure-ai-inference:

  • sample_chat_completions_with_azure_ai_inference_client_and_azure_monitor_tracing.py - Runs without errors. Everything looks good, I see the chat completion trace with request and response messages, in Foundry "tracing" page. But why do I see two calls to "POST /models/chat/completions"? There should only be one..
  • sample_chat_completions_with_azure_ai_inference_client_and_console_tracing.py - Runs without errors, but I do not see console log of chat HTTP call. I used to see it before, then I uninstalled all Python packages, then installed only what I thought it needed to run this sample. But now I don't see all the console logs. Am I missing a package?

Issues in \sdk\ai\azure-ai-projects\samples\inference\azure-openai:

  • sample_chat_completions_with_azure_openai_client_and_azure_monitor_tracing.py - Runs without errors. I see the trace of the call to method "InferenceOperations.get_azure_openai_client" and I see the AzureOpenAI chat trace, but even though OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT is defined to "true", I don't see the request & response messages in the traces
  • sample_chat_completions_with_azure_openai_client_and_console_tracing.py - Runs without errors. I see traces, but they do not include the request/response message even though OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT is defined to "true"

Still to do: Need to add comments in the two samples that trace to console, on how to trace to otel endpoint instead.

dargilco and others added 13 commits May 16, 2025 08:45
* projects enable_telemetry fix for agents

* updating changelog
Update README.md to mention what REST APIs the client library is using, and provide link to REST API reference docs

Make sure sync and async inference operations use the same method to calculate inference URL (remove duplicate)

As a workaround for service bug, until there is a service fix, modify auto-emitted code to accept 200 as a success code for 
Datasets DELETE operation. The service should be returning 204 according to TypeSpec, since there is no response payload on success of the delete operation.
…_client()` and `get_image_embeddings_client()` (#41570)
@dargilco dargilco requested a review from jhakulin as a code owner June 17, 2025 00:50
@dargilco dargilco self-assigned this Jun 17, 2025
Copy link

github-actions bot commented Jun 17, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-ai-projects

@dargilco dargilco changed the title Cleanup enable_telemetry() Cleanup of enable_telemetry() - Remove enabling tracing for azure-ai-inference Jun 17, 2025
jhakulin
jhakulin previously approved these changes Jun 17, 2025
@dargilco dargilco changed the title Cleanup of enable_telemetry() - Remove enabling tracing for azure-ai-inference Remove package function enable_telemetry() Jun 19, 2025
Base automatically changed from feature/azure-ai-projects/1.0.0b12 to main June 27, 2025 01:54
@dargilco dargilco dismissed jhakulin’s stale review June 27, 2025 01:54

The base branch was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants