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

[feat]:Custom Backend Tracing #7403

Merged
merged 15 commits into from
Jul 5, 2024
Merged

Conversation

oandreeva-nv
Copy link
Contributor

@oandreeva-nv oandreeva-nv commented Jul 2, 2024

What does the PR do?

NOTE: currently targeting refactor PR: #7390 , after refactor is merged, will target main, or we can merge this PR to refactor and then refactor to main.

Currently Triton Trace capabilities are limited to reporting of a predefined set of activities listed here. Neither of the listed options support tracing a custom activity that a potential user might want to capture.

This PR includes frontend adjustments to support Custom Backend features, including:

  • it handles new activity type TRITONSERVER_TRACE_CUSTOM_ACTIVITY
  • for Triton Trace API it extracts custom activity name from trace context and reports it in the log file
  • for OpenTelemetry Trace API it also extracts custom activity name from trace context
    • If custom activity name doesn't end with _START or _END, an event is added to a currently active span (i.e. on top of the stack)
    • Otherwise, it either starts or ends the currently active span
    • Docs mention that it is user's responsibility to make sure that each opened active span should be properly closed.
  • Added docs
  • Added tests for Triton Trace API and OpenTelemetry Trace API.

Sample OpenTelemetry trace:
image

Checklist

  • PR title reflects the change and is of format <commit_type>: <Title>
  • Changes are described in the pull request.
  • Related issues are referenced.
  • Populated github labels field
  • Added test plan and verified test passes.
  • Verified that the PR passes existing CI.
  • Verified copyright is correct on all changed files.
  • Added succinct git squash message before merging ref.
  • All template sections are filled out.
  • Optional: Additional screenshots for behavior/output changes with before/after.

Commit Type:

Check the conventional commit type
box here and add the label to the github PR.

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Related PRs:

server PR: #7403
identity backend: triton-inference-server/identity_backend#30

Where should the reviewer start?

TEP

Test plan: Added tests for Triton Trace API and OpenTelemetry Trace API.

  • CI Pipeline ID: 16268312

Caveats:

Background

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

@oandreeva-nv oandreeva-nv added enhancement New feature or request module: backends Issues related to the backends module: server Issues related to the server core and frontends PR: feat A new feature labels Jul 2, 2024
@oandreeva-nv oandreeva-nv marked this pull request as ready for review July 2, 2024 22:10
qa/L0_trace/test.sh Outdated Show resolved Hide resolved
src/tracer.cc Show resolved Hide resolved
src/tracer.cc Outdated Show resolved Hide resolved
@oandreeva-nv oandreeva-nv force-pushed the oandreeva-custom-trace-activity branch from 741b015 to 69434d7 Compare July 3, 2024 23:36
src/tracer.cc Show resolved Hide resolved
qa/L0_trace/test.sh Outdated Show resolved Hide resolved
qa/L0_trace/test.sh Outdated Show resolved Hide resolved
qa/L0_trace/test.sh Outdated Show resolved Hide resolved
Base automatically changed from oandreeva-trace-refactor to main July 5, 2024 21:50
@oandreeva-nv oandreeva-nv merged commit f5273ee into main Jul 5, 2024
3 checks passed
@oandreeva-nv oandreeva-nv deleted the oandreeva-custom-trace-activity branch July 5, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module: backends Issues related to the backends module: server Issues related to the server core and frontends PR: feat A new feature
Development

Successfully merging this pull request may close these issues.

4 participants