opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

[DO NOT MERGE] Showcase PR: Add profiling pdata

Open dmathieu opened this issue 1 year ago • 11 comments

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 avatar May 07 '24 12:05 dmathieu

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?

dmathieu avatar May 07 '24 20:05 dmathieu

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

bogdandrutu avatar May 08 '24 03:05 bogdandrutu

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 avatar May 08 '24 07:05 dmathieu

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

dmathieu avatar May 08 '24 17:05 dmathieu

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 https://github.com/open-telemetry/opentelemetry-collector/issues/6508#issuecomment-1400023599

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)

mx-psi avatar May 09 '24 10:05 mx-psi

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

dmathieu avatar May 11 '24 09:05 dmathieu

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 :warning:
pdata/internal/generated_wrapper_float64slice.go 0.00% 5 Missing :warning:
pdata/internal/generated_wrapper_int64slice.go 54.54% 5 Missing :warning:
pdata/internal/generated_wrapper_stringslice.go 54.54% 5 Missing :warning:
pdata/internal/generated_wrapper_uint64slice.go 0.00% 5 Missing :warning:
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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 11 '24 09:05 codecov[bot]

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.

dmathieu avatar May 13 '24 18:05 dmathieu

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

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

mx-psi avatar May 13 '24 19:05 mx-psi

#10155 caused a conflict

mx-psi avatar May 15 '24 18:05 mx-psi

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 avatar May 16 '24 07:05 dmathieu

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

dmathieu avatar May 21 '24 16:05 dmathieu