Skip to content

Conversation

@jelly-afk
Copy link
Contributor

trim component type suffix from component name

@jelly-afk jelly-afk requested review from a team as code owners September 23, 2025 14:16
@jelly-afk jelly-afk requested a review from dmitryax September 23, 2025 14:16
@codecov
Copy link

codecov bot commented Sep 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.48%. Comparing base (d80ba7b) to head (0f30fd1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1255      +/-   ##
==========================================
+ Coverage   62.43%   62.48%   +0.04%     
==========================================
  Files          65       65              
  Lines        4020     4025       +5     
==========================================
+ Hits         2510     2515       +5     
  Misses       1278     1278              
  Partials      232      232              

☔ 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.

@dmathieu
Copy link
Member

Is this coming from a specific need? I find this to be a bit weird. It introduces a mismatch between the component name and the actual package name.

@jelly-afk
Copy link
Contributor Author

getComponent is used for labels and it was generating different labels from the commonly used ones {componentType}/{ComponentName} , and some packages have {componentType}/{componentName}{componentType}

open-telemetry/opentelemetry-collector-contrib#42826 (comment)

@mx-psi
Copy link
Member

mx-psi commented Sep 23, 2025

Is this coming from a specific need? I find this to be a bit weird. It introduces a mismatch between the component name and the actual package name.

This is collector-specific, I think the reason for this was that some components had a name so long that not doing this made it so we would reach label length limits 😅

@mx-psi
Copy link
Member

mx-psi commented Sep 24, 2025

@dmathieu I understand this change makes issuegenerator less useful in context other than the Collector's. On githubgen we went with this option:

trimSuffixes := flag.String("trim-component-suffixes", "receiver, exporter, extension, processor, connector, internal", "Define a comma-separated list of suffixes that should be trimmed from paths during generation of issue templates")

that made the tool a bit more generic while still satisfying this use case. Do you think that is an acceptable way of doing this?

@dmathieu
Copy link
Member

This change is fine by me. The only other user of issuegenerator (that I know of) is ebpf-profiler, it has a single go module and no tags are set on issue generation. So this is fine.

@mx-psi mx-psi merged commit 3e7c776 into open-telemetry:main Sep 24, 2025
14 checks passed
@atoulme atoulme mentioned this pull request Oct 4, 2025
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.

3 participants