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

[DO NOT MERGE] Showcase PR: Add profiling pdata #10109

Closed
wants to merge 14 commits into from

Conversation

dmathieu
Copy link
Member

@dmathieu dmathieu commented May 7, 2024

Description

This adds the profiling proto schema to pdata, so the receiver/consumer interfaces can then start accepting that data.

Proto files:
https://github.com/open-telemetry/opentelemetry-proto/tree/main/opentelemetry/proto/profiles/v1experimental

Testing

This is being tested by auto-generated tests.

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

@dmathieu dmathieu marked this pull request as ready for review May 7, 2024 13:27
@dmathieu dmathieu requested a review from a team as a code owner May 7, 2024 13:27
@dmathieu dmathieu requested a review from songy23 May 7, 2024 13:27
Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

Please do not add an experimental API into the stable pdata module. Split the pprofile part into separate module, and when no longer experimental maybe we can include back into the main pdata.

@dmathieu
Copy link
Member Author

dmathieu commented May 7, 2024

Sure.
Should I put it into experimental/pdata/pprofile (in which case pdatagen can't be used, has to be refactored or something else, as it only handles putting generated code into the pdata package), or pdata/pprofileexperimental?

@bogdandrutu
Copy link
Member

Sure.
Should I put it into experimental/pdata/pprofile (in which case pdatagen can't be used, has to be refactored or something else, as it only handles putting generated code into the pdata package), or pdata/pprofileexperimental?

Just have a different module for pdata/pprofile

@dmathieu
Copy link
Member Author

dmathieu commented May 8, 2024

I have moved it into pdata/experimental.
I couldn't move it to experimental/pdata, as we need access to the pdata/internal package.

@dmathieu dmathieu requested a review from bogdandrutu May 8, 2024 08:16
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.

This doesn't need to be in an experimental folder, we just need it to be in a different Go module versioned 0.x. That way when we go from 0.x to 1.x, we won't need to change the imports for this package

@dmathieu
Copy link
Member Author

dmathieu commented May 8, 2024

This is very unclear.
To try to clarify, you want it in pdata/pprofile, but with its own go.mod?

@mx-psi
Copy link
Member

mx-psi commented May 9, 2024

This is very unclear. To try to clarify, you want it in pdata/pprofile, but with its own go.mod?

Sorry, yes, that's the preferred way of going about this. There is some prior discussion on #6508 and #4705, in particular see the summary on #6508 (comment)

The idea is to minimize changes in import paths while honoring semver (since profiles are still experimental, we need its related packages to be 0.x)

@dmathieu
Copy link
Member Author

Thank you very much for your input 😃
I've moved it back into pdata/pprofile, with its own go.mod.

Copy link

codecov bot commented May 11, 2024

Codecov Report

Attention: Patch coverage is 98.12030% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 92.09%. Comparing base (1d52fb9) to head (661d072).

Files Patch % Lines
pdata/internal/generated_wrapper_byteslice.go 0.00% 5 Missing ⚠️
pdata/internal/generated_wrapper_float64slice.go 0.00% 5 Missing ⚠️
pdata/internal/generated_wrapper_int64slice.go 54.54% 5 Missing ⚠️
pdata/internal/generated_wrapper_stringslice.go 54.54% 5 Missing ⚠️
pdata/internal/generated_wrapper_uint64slice.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10109      +/-   ##
==========================================
+ Coverage   91.63%   92.09%   +0.46%     
==========================================
  Files         356      386      +30     
  Lines       16849    18179    +1330     
==========================================
+ Hits        15439    16742    +1303     
- Misses       1068     1094      +26     
- Partials      342      343       +1     

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

@dmathieu dmathieu requested a review from mx-psi May 11, 2024 15:16
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.

How are the pcommon slice changes related to the profile? Could we get those in first in a separate PR?

@dmathieu
Copy link
Member Author

It's required because the primitive slices struct type only allowed numbers, not strings.
Sure, I'm happy to split this into a set of smaller PRs.

@mx-psi
Copy link
Member

mx-psi commented May 13, 2024

Sure, I'm happy to split this into a set of smaller PRs.

👌 Thanks, since pcommon is part of a 1.0 module I would like us to consider this changes separately and carefully

mx-psi pushed a commit that referenced this pull request May 15, 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 an `originFieldName` option to `sliceField`,
`messageValueField` and `primitiveField`.
This option already exists for `primitiveTypedField`, `oneOfField`,
`oneOfPrimitiveValue` and `oneOfMessageValue`.

#### Link to tracking issue

This is needed for #10109.

<!--Describe what testing was performed and which tests were added.-->
#### Testing

This is unit tested.

cc @mx-psi
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.

Note: we need to update the README per

8. Update the supported OTLP version in [README.md](./README.md).
on this PR

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

This upgrades the proto to their latest version, and generates the
profiles.

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

cc @mx-psi
@mx-psi
Copy link
Member

mx-psi commented May 15, 2024

#10155 caused a conflict

@dmathieu
Copy link
Member Author

Yes, but the commit history isn't the same between my extracted PRs and this one. So I will be opening a new one with the actual pdata changes.

@dmathieu dmathieu changed the title Add profiling pdata [DO NOT MERGE] Showcase PR: Add profiling pdata May 16, 2024
mx-psi pushed a commit that referenced this pull request May 16, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

We upgraded the proto version, so we need to upgrade it in the readme as
well.

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

*
#10109 (review)
* #10155
mx-psi added a commit that referenced this pull request May 21, 2024
…umber slices (#10148)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This adds a string slice to pcommon, that will be used by the profiles
pdata.

#### Link to tracking issue

Part of #10109.

#### Testing

This is unit-tested.

cc @mx-psi

---------

Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
@dmathieu
Copy link
Member Author

Closing this in favor of the last step PR, #10195.

@dmathieu dmathieu closed this May 21, 2024
@dmathieu dmathieu deleted the profiles branch May 21, 2024 16:05
mx-psi added a commit that referenced this pull request May 24, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This generates the pdata for profiles.

<!-- Issue number if applicable -->
#### Link to tracking issue
Last step of #10109.

<!--Describe what testing was performed and which tests were added.-->
#### Testing

The generated code is unit-tested by generated tests.

cc @mx-psi

---------

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
andrzej-stencel pushed a commit to andrzej-stencel/opentelemetry-collector that referenced this pull request May 27, 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 an `originFieldName` option to `sliceField`,
`messageValueField` and `primitiveField`.
This option already exists for `primitiveTypedField`, `oneOfField`,
`oneOfPrimitiveValue` and `oneOfMessageValue`.

#### Link to tracking issue

This is needed for open-telemetry#10109.

<!--Describe what testing was performed and which tests were added.-->
#### Testing

This is unit tested.

cc @mx-psi
andrzej-stencel pushed a commit to andrzej-stencel/opentelemetry-collector that referenced this pull request May 27, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This upgrades the proto to their latest version, and generates the
profiles.

<!-- Issue number if applicable -->
#### Link to tracking issue
Part of open-telemetry#10109

cc @mx-psi
andrzej-stencel pushed a commit to andrzej-stencel/opentelemetry-collector that referenced this pull request May 27, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

We upgraded the proto version, so we need to upgrade it in the readme as
well.

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

*
open-telemetry#10109 (review)
* open-telemetry#10155
andrzej-stencel pushed a commit to andrzej-stencel/opentelemetry-collector that referenced this pull request May 27, 2024
…umber slices (open-telemetry#10148)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This adds a string slice to pcommon, that will be used by the profiles
pdata.

#### Link to tracking issue

Part of open-telemetry#10109.

#### Testing

This is unit-tested.

cc @mx-psi

---------

Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
andrzej-stencel pushed a commit to andrzej-stencel/opentelemetry-collector that referenced this pull request May 27, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This generates the pdata for profiles.

<!-- Issue number if applicable -->
#### Link to tracking issue
Last step of open-telemetry#10109.

<!--Describe what testing was performed and which tests were added.-->
#### Testing

The generated code is unit-tested by generated tests.

cc @mx-psi

---------

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
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

4 participants