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

Setters and getters for trace IDs #967

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sanrise
Copy link
Contributor

@sanrise sanrise commented Jul 26, 2024

Summary:
This commit moves the trace ID initialization logic to be inline with how ActivityProfilers interact with LoggerObservers by setting a default local trace ID when a profiler config does not contain a trace ID.

The USTLoggerCollector, which is our internal LoggerObserver will record the trace ID for a given environment (which is a PID today) using the setTraceID method that all LoggerObservers must staisfy. Additionally any internal calls to read this trace ID, for example from our ManifoldChromeTrace logger, may use a special getTraceID method that ships with USTLoggerCollector.

Group trace IDs are handled accordingly.

Differential Revision: D60267172

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60267172

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60267172

sanrise added a commit to sanrise/kineto that referenced this pull request Jul 26, 2024
Summary:
Pull Request resolved: pytorch#967

This commit moves the trace ID initialization logic to be inline with how ActivityProfilers interact with LoggerObservers by setting a default local trace ID when a profiler config does not contain a trace ID.

The USTLoggerCollector, which is our internal LoggerObserver will record the trace ID for a given environment (which is a PID today) using the `setTraceID` method that all LoggerObservers must staisfy. Additionally any internal calls to read this trace ID, for example from our ManifoldChromeTrace logger, may use a special `getTraceID` method that ships with `USTLoggerCollector`.

Group trace IDs are handled accordingly.

Differential Revision: D60267172
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60267172

sanrise added a commit to sanrise/kineto that referenced this pull request Jul 26, 2024
Summary:
Pull Request resolved: pytorch#967

This commit moves the trace ID initialization logic to be inline with how ActivityProfilers interact with LoggerObservers by setting a default local trace ID when a profiler config does not contain a trace ID.

The USTLoggerCollector, which is our internal LoggerObserver will record the trace ID for a given environment (which is a PID today) using the `setTraceID` method that all LoggerObservers must staisfy. Additionally any internal calls to read this trace ID, for example from our ManifoldChromeTrace logger, may use a special `getTraceID` method that ships with `USTLoggerCollector`.

Group trace IDs are handled accordingly.

Differential Revision: D60267172
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60267172

sanrise added a commit to sanrise/kineto that referenced this pull request Jul 26, 2024
Summary:
Pull Request resolved: pytorch#967

This commit moves the trace ID initialization logic to be inline with how ActivityProfilers interact with LoggerObservers by setting a default local trace ID when a profiler config does not contain a trace ID.

The USTLoggerCollector, which is our internal LoggerObserver will record the trace ID for a given environment (which is a PID today) using the `setTraceID` method that all LoggerObservers must staisfy. Additionally any internal calls to read this trace ID, for example from our ManifoldChromeTrace logger, may use a special `getTraceID` method that ships with `USTLoggerCollector`.

Group trace IDs are handled accordingly.

Differential Revision: D60267172
Copy link
Contributor

@sraikund16 sraikund16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Summary:
Pull Request resolved: pytorch#967

This commit moves the trace ID initialization logic to be inline with how ActivityProfilers interact with LoggerObservers by setting a default local trace ID when a profiler config does not contain a trace ID.

The USTLoggerCollector, which is our internal LoggerObserver will record the trace ID for a given environment (which is a PID today) using the `setTraceID` method that all LoggerObservers must staisfy. Additionally any internal calls to read this trace ID, for example from our ManifoldChromeTrace logger, may use a special `getTraceID` method that ships with `USTLoggerCollector`.

Group trace IDs are handled accordingly.

Differential Revision: D60267172
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60267172

Copy link
Member

@aaronenyeshi aaronenyeshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forget if this diff was refactored somewhere, accepting to unblock.

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.

4 participants