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

[trace][refactor] Move tracing related functions to a better place #2990

Merged
merged 15 commits into from
Apr 25, 2024

Conversation

zhengfeiwang
Copy link
Contributor

@zhengfeiwang zhengfeiwang commented Apr 24, 2024

Description

Move tracing related functions

  • promptflow._sdk._tracing: tracing related function import place, with unit tests covered and guarded
    • for promptflow-tracing: start_trace_with_devkit, setup_exporter_to_pfs
    • for OTLP collector, runtime and others: process_otlp_trace_request - parse span from Protocol Buffer
  • promptflow._sdk._utils.tracing: utilities for tracing

Remove previous tracing utilities file _tracing_utils.py.

Pass function that gets credential

For process_otlp_trace_request usage, user should pass the function that how to get credential, instead of the credential itself. However, as the environment may not have Azure extension, so we cannot directly pass AzureCliCredential in outside; so add a default logic inside the function.

All Promptflow Contribution checklist:

  • The pull request does not introduce [breaking changes].
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: suggested workflow.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copy link

github-actions bot commented Apr 24, 2024

promptflow SDK CLI Azure E2E Test Result zhengfei/refactor/tracing-utils

  4 files    4 suites   5m 2s ⏱️
238 tests 203 ✅  35 💤 0 ❌
952 runs  812 ✅ 140 💤 0 ❌

Results for commit dae9424.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 24, 2024

SDK CLI Global Config Test Result zhengfei/refactor/tracing-utils

4 tests   4 ✅  1m 16s ⏱️
1 suites  0 💤
1 files    0 ❌

Results for commit dae9424.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 24, 2024

Executor Unit Test Result zhengfei/refactor/tracing-utils

792 tests   792 ✅  3m 43s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit dae9424.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 24, 2024

Executor E2E Test Result zhengfei/refactor/tracing-utils

241 tests   236 ✅  5m 11s ⏱️
  1 suites    5 💤
  1 files      0 ❌

Results for commit dae9424.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Apr 24, 2024

SDK CLI Test Result zhengfei/refactor/tracing-utils

    4 files      4 suites   57m 41s ⏱️
  663 tests   650 ✅ 13 💤 0 ❌
2 652 runs  2 600 ✅ 52 💤 0 ❌

Results for commit dae9424.

♻️ This comment has been updated with latest results.

thy09
thy09 previously approved these changes Apr 25, 2024
riddlexu
riddlexu previously approved these changes Apr 25, 2024
@zhengfeiwang zhengfeiwang merged commit 9f2bc05 into main Apr 25, 2024
42 checks passed
@zhengfeiwang zhengfeiwang deleted the zhengfei/refactor/tracing-utils branch April 25, 2024 09:46
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.

5 participants