Skip to content

[cmd/mdatagen] support template datatype #12938

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

odubajDT
Copy link

@odubajDT odubajDT commented Apr 29, 2025

Description

The aim is to support the new semantic conventions for k8s workloads and generation of code for the template datatype

Link to tracking issue

Fixes #12891

Testing

tested the new functionality on kubeletstatsreceiver here

Signed-off-by: odubajDT <[email protected]>
Copy link

codecov bot commented Apr 29, 2025

Codecov Report

Attention: Patch coverage is 31.57895% with 13 lines in your changes missing coverage. Please review.

Project coverage is 91.60%. Comparing base (7adca80) to head (b0209be).

Files with missing lines Patch % Lines
cmd/mdatagen/internal/metadata.go 0.00% 11 Missing ⚠️
pdata/pcommon/value.go 75.00% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (31.57%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12938      +/-   ##
==========================================
- Coverage   91.65%   91.60%   -0.05%     
==========================================
  Files         503      503              
  Lines       27641    27657      +16     
==========================================
+ Hits        25333    25336       +3     
- Misses       1822     1835      +13     
  Partials      486      486              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: odubajDT <[email protected]>
// NewValueTemplate creates a new Value with the given string value.
func NewValueTemplate(v string) Value {
state := internal.StateMutable
return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_StringValue{StringValue: v}}, &state)
Copy link
Author

Choose a reason for hiding this comment

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

@dmitryax maybe question here, should we rather define a full new datatype for the template type, or reuse the string one, since template is not a real-world datatype. Thanks!

@odubajDT odubajDT marked this pull request as ready for review April 30, 2025 06:13
@odubajDT odubajDT requested a review from a team as a code owner April 30, 2025 06:13
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.

[cmd/mdatagen] Support template datatype
1 participant