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

RFC: Experimental profiling #10375

Merged
merged 12 commits into from
Jun 28, 2024

Conversation

dmathieu
Copy link
Member

@dmathieu dmathieu commented Jun 10, 2024

Description

This is an RFC discussing the proposed solution for adding the profiling signal.
Follows #10207

PoC: #10307

cc @open-telemetry/profiling-triagers @open-telemetry/profiling-approvers @open-telemetry/profiling-maintainers
cc @open-telemetry/collector-approvers

Copy link
Member

@christos68k christos68k left a comment

Choose a reason for hiding this comment

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

LGTM

docs/rfcs/experimental-profiling.md Outdated Show resolved Hide resolved
docs/rfcs/experimental-profiling.md Outdated Show resolved Hide resolved
docs/rfcs/experimental-profiling.md Outdated Show resolved Hide resolved
docs/rfcs/experimental-profiling.md Outdated Show resolved Hide resolved
docs/rfcs/experimental-profiling.md Outdated Show resolved Hide resolved
@dmathieu dmathieu marked this pull request as ready for review June 11, 2024 08:54
@dmathieu dmathieu requested review from a team and mx-psi June 11, 2024 08:54
@mx-psi mx-psi added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jun 11, 2024
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.36%. Comparing base (ea7270c) to head (ae8072d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10375   +/-   ##
=======================================
  Coverage   92.36%   92.36%           
=======================================
  Files         386      386           
  Lines       18400    18400           
=======================================
  Hits        16995    16995           
  Misses       1052     1052           
  Partials      353      353           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Thanks @dmathieu, this looks great. Just one comment

docs/rfcs/experimental-profiling.md Show resolved Hide resolved
@dmathieu

This comment was marked as resolved.

@mx-psi
Copy link
Member

mx-psi commented Jun 13, 2024

@dmathieu I think #10253 is a possible way to address this, since it addresses this:

But this can't work, as the WithProfiles method needs to manipulate private values, and can't do that from an outside module.

Could you take a look and let me know if that addresses the issue?

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

I think we can merge this as is and as noted on the Collector SIG I believe we can merge this on Friday.

One remaining step is what to do with service and <receiver|exporter|connector|processor>.Builder. The problem is that we don't pass the configuration directly to the service and instead pass Builders. These builders encapsulate the factories and config, thus we lose access to the config.

We will need to solve this problem during implementation, some options are:

  1. Add a Config method to builders similar to the Factory method
  2. Make builders internal to the service and pass the config and factories explicitly (honestly at this point my preferred option, there is no real abstraction/usefulness to have these exposed)
  3. Make the builders into sealed interfaces like with the factory interfaces? (not sure if there's much of a point for this)

@mx-psi mx-psi merged commit c60fb1d into open-telemetry:main Jun 28, 2024
50 checks passed
@github-actions github-actions bot added this to the next release milestone Jun 28, 2024
@dmathieu dmathieu deleted the rfc-experimental-profiling branch June 28, 2024 08:33
mx-psi pushed a commit that referenced this pull request Jul 30, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This follows
#10527,
and adds profiles support into exporters.

<!-- Issue number if applicable -->
#### Link to tracking issue
See #10375
mx-psi pushed a commit that referenced this pull request Jul 30, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This follows
#10526,
and adds profiles support into processors.

<!-- Issue number if applicable -->
#### Link to tracking issue
See #10375

cc @mx-psi
mx-psi added a commit that referenced this pull request Jul 31, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This follows
#10530,
and adds profiles support into receivers.

<!-- Issue number if applicable -->
#### Link to tracking issue
See #10375

cc @mx-psi

---------

Co-authored-by: Pablo Baeyens <[email protected]>
mx-psi pushed a commit that referenced this pull request Jul 31, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This follows
#10524 and
adds profiles support into connectors.

<!-- Issue number if applicable -->
#### Link to tracking issue
See #10375
@dmathieu
Copy link
Member Author

dmathieu commented Aug 1, 2024

Following a discussion with @mx-psi this morning, we have decided to follow option 2 mentioned above for the builders.

@atoulme
Copy link
Contributor

atoulme commented Aug 1, 2024

I have pasted this in a couple PRs, pasting it here as well:

Before we break the API, we typically deprecate it for at least one release. More here: https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#breaking-changes

@dmathieu
Copy link
Member Author

dmathieu commented Aug 2, 2024

Sure, I've done that in all 5 PRs.

dmitryax pushed a commit that referenced this pull request Aug 21, 2024
#### Description

This moves the receiver builder out of the `receiver` package, and into
`service/internal/builders`.
There's no real reason for this struct to be public (folks shouldn't
call it), and making it private will allow us to add profiling support
to it.

#### Link to tracking issue

#10375 (review)
mx-psi pushed a commit that referenced this pull request Aug 22, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This moves the connector builder out of the `connector` package, and
into `service/internal/builders`.
There's no real reason for this struct to be public (folks shouldn't
call it), and making it private will allow us to add profiling support
to it.

<!-- Issue number if applicable -->
#### Link to tracking issue

#10375 (review)
mx-psi pushed a commit that referenced this pull request Aug 22, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This moves the connector builder out of the `connector` package, and
into `service/internal/builders`.
There's no real reason for this struct to be public (folks shouldn't
call it), and making it private will allow us to add profiling support
to it.

<!-- Issue number if applicable -->
#### Link to tracking issue

#10375 (review)

While this is not technically required for the profiles work (there is
no notion of signals in extensions), this PR is here to keep things
consistent.
mx-psi pushed a commit that referenced this pull request Aug 22, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This moves the exporter builder out of the `exporter` package, and into
`service/internal/builders`.
There's no real reason for this struct to be public (folks shouldn't
call it), and making it private will allow us to add profiling support
to it.

<!-- Issue number if applicable -->
#### Link to tracking issue

#10375 (review)
mx-psi pushed a commit that referenced this pull request Aug 22, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This moves the processor builder out of the `processor` package, and
into `service/internal/builders`.
There's no real reason for this struct to be public (folks shouldn't
call it), and making it private will allow us to add profiling support
to it.

<!-- Issue number if applicable -->
#### Link to tracking issue

#10375 (review)
mx-psi pushed a commit that referenced this pull request Aug 29, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This adds profiles support in fanoutconsumer. That is required to be
able to handle profiles in the service graph.
As this is only changing internal modules, I am marking it as chore (and
skipping changelog entry).

<!-- Issue number if applicable -->
#### Link to tracking issue
#10375

cc @mx-psi
mx-psi pushed a commit that referenced this pull request Aug 29, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This allows building profiles in the receiver builder.
As this is only changing internal modules, I am marking it as chore (and
skipping changelog entry).

<!-- Issue number if applicable -->
#### Link to tracking issue
#10375

cc @mx-psi
mx-psi pushed a commit that referenced this pull request Aug 29, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This allows building profiles in the processor builder.
As this is only changing internal modules, I am marking it as chore (and
skipping changelog entry).

#### Link to tracking issue
#10375

cc @mx-psi
mx-psi pushed a commit that referenced this pull request Aug 30, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This allows building profiles in the connector builder.
As this is only changing internal modules, I am marking it as chore (and
skipping changelog entry).

#### Link to tracking issue
#10375

cc @mx-psi
mx-psi pushed a commit that referenced this pull request Aug 30, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This allows building profiles in the exporter builder.
As this is only changing internal modules, I am marking it as chore (and
skipping changelog entry).

#### Link to tracking issue
#10375

cc @mx-psi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants