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

Allow indexing string slice type #35581

Merged

Conversation

lkwronski
Copy link
Contributor

@lkwronski lkwronski commented Oct 3, 2024

Description: Allow indexing string slice type. I can also add support for other types such as []int if needed. Let me know if this approach is good enough.

I haven't found a more generic solution, thank you for any feedback.

Link to tracking Issue: Fixes #29441

Testing: Unit test

Documentation:

@lkwronski lkwronski force-pushed the lkwronski.issue-29441-slice branch from f4881d7 to 0542dad Compare October 3, 2024 14:52
Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

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

Using this approach for OTTL's supported types feels correct for now.

@evan-bradley evan-bradley merged commit d20c3f8 into open-telemetry:main Oct 14, 2024
154 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 14, 2024
sbylica-splunk pushed a commit to sbylica-splunk/opentelemetry-collector-contrib that referenced this pull request Dec 17, 2024
**Description:** Allow indexing string slice type. I can also add
support for other types such as []int if needed. Let me know if this
approach is good enough.

I haven't found a more generic solution, thank you for any feedback.

**Link to tracking Issue:** Fixes  open-telemetry#29441

**Testing:** Unit test

**Documentation:**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pkg/ottl] Allow indexing any slice type
3 participants