open-telemetry / opentelemetry-ruby

OpenTelemetry Ruby API & SDK, and related gems
https://opentelemetry.io/
Apache License 2.0
491 stars 240 forks source link

Update `Internal.valid_attributes` for reuse with log records #1739

Open kaylareopelle opened 1 month ago

kaylareopelle commented 1 month ago

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

github-actions[bot] commented 6 days ago

👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.