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

TEST: add some random logging #125176

Draft
wants to merge 6 commits into
base: gh/c-p-i-o/5/base
Choose a base branch
from
Draft

Conversation

c-p-i-o
Copy link
Contributor

@c-p-i-o c-p-i-o commented Apr 29, 2024

Stack from ghstack (oldest at bottom):

Summary:
Testing OTEL in PyTorch to see what automation workflows break.
This change won't be commited into the main branch.

Differential Revision: D56786948

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Apr 29, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/125176

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 41f4958 with merge base e7631d6 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

c-p-i-o added a commit that referenced this pull request Apr 29, 2024
Summary:
Testing OTEL in PyTorch to see what automation workflows break.
This change won't be commited into the main branch.

ghstack-source-id: 6043560b23b4b0588ac441d6602d0980ae025c9b
Pull Request resolved: #125176
@c-p-i-o c-p-i-o marked this pull request as draft April 29, 2024 18:37
opentelemetry::trace::StartSpanOptions start;
start.start_system_time = SystemTimestamp(std::chrono::nanoseconds(300));
std::shared_ptr<opentelemetry::metrics::Counter<uint64_t>> counter{
new opentelemetry::metrics::NoopCounter<uint64_t>("testi2", "none", "unitless")};

Choose a reason for hiding this comment

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

rather than binding to concrete implementation you want to pull it from the Meter:

auto meter = opentelemetry::metrics::Provider::GetMeterProvider()->GetMeter(...);
auto counter = meter->CreateUInt64Counter(...);

Also, it's more efficient to create counter once as static or member variable.

[ghstack-poisoned]
c-p-i-o added a commit that referenced this pull request Apr 29, 2024
Summary:
Testing OTEL in PyTorch to see what automation workflows break.
This change won't be commited into the main branch.

ghstack-source-id: d7b9eaa8b8489c9cee3053a8b1b3b801bb4d6c45
Pull Request resolved: #125176
[ghstack-poisoned]
c-p-i-o added a commit that referenced this pull request Apr 29, 2024
Summary:
Testing OTEL in PyTorch to see what automation workflows break.
This change won't be commited into the main branch.

ghstack-source-id: b7121de3b50bd5c7569eba3f7dd52b0148c05619
Pull Request resolved: #125176
[ghstack-poisoned]
c-p-i-o added a commit that referenced this pull request Apr 29, 2024
Summary:
Testing OTEL in PyTorch to see what automation workflows break.
This change won't be commited into the main branch.

ghstack-source-id: 182052093070b5182350a1b2c6d1c20e6b4607a6
Pull Request resolved: #125176
[ghstack-poisoned]
c-p-i-o added a commit that referenced this pull request Apr 30, 2024
Summary:
Testing OTEL in PyTorch to see what automation workflows break.
This change won't be commited into the main branch.

ghstack-source-id: 099915604e42c865b6de349fd66c99dc81885c3d
Pull Request resolved: #125176
[ghstack-poisoned]
c-p-i-o added a commit that referenced this pull request Apr 30, 2024
Summary:
Testing OTEL in PyTorch to see what automation workflows break.
This change won't be commited into the main branch.

ghstack-source-id: 55109b7fd9162bafaff03a5dd21442637b64d01c
Pull Request resolved: #125176
@c-p-i-o
Copy link
Contributor Author

c-p-i-o commented Apr 30, 2024

@c-p-i-o has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

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

Successfully merging this pull request may close these issues.

None yet

2 participants