open-telemetry / open-telemetry/opentelemetry-ruby
Update `Internal.valid_attributes` for reuse with log records
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 606
- Forks
- 301
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 42
Description
There's a lot of duplication among the tracing SDK and the logs SDK. One of the areas of duplication is with LogRecord#validate_attributes. This is very similar to the code in Internal.valid_attributes.
Once the logs SDK is stable and we're ready to bring it into the main SDK gem, refactor Internal.valid_attributes for use with both signals. Depending on the timing, this may also be helpful for metric attribute validation as well.
This issue originated from this comment: https://github.com/open-telemetry/opentelemetry-ruby/pull/1696/files#r1759599051
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Internal.valid_attributes and LogRecord#validate_attributes, then compare the tracing and logs SDK validation paths. Determine the shared behavior needed for both signals, with metric attribute validation as a possible extension. Done means the duplicated validation is reusable without changing the required behavior for logs or tracing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- observability-sre
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100