Skip to content

Add Utility to Collect Platform Information#2097

Merged
jennchenn merged 5 commits into
masterfrom
host-info-utility
Jun 20, 2022
Merged

Add Utility to Collect Platform Information#2097
jennchenn merged 5 commits into
masterfrom
host-info-utility

Conversation

@jennchenn

Copy link
Copy Markdown
Member

Description

Added module to collect information on the platform that dd-trace is running on. This information will be used in telemetry API requests (payload spec can be found here).

Open Questions

  • Does the location of this utility make sense?
  • Telemetry also accepts values for os and os_version--the environment_logger.rb file uses RbConfig to get the os name (here). This doesn't match the value from uname -o exactly as it also includes architecture information (GNU/Linux vs. aarch64-unknown-linux-gnu); however, would it be better to send that value anyway rather than sending nothing?

@jennchenn jennchenn added the core Involves Datadog core libraries label Jun 20, 2022
@jennchenn jennchenn self-assigned this Jun 20, 2022
@jennchenn
jennchenn requested a review from a team June 20, 2022 18:54
Comment thread lib/datadog/core/environment/platform.rb

@marcotc marcotc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's make sure these methods only return not-nil when we are confident of the values.

For example, for JRuby, we should only return values if they reflect uname -foo.

Comment thread lib/datadog/core/environment/platform.rb

@marcotc marcotc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Only one small comment left.

@marcotc marcotc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No small comments left.

@jennchenn
jennchenn merged commit e90cdf3 into master Jun 20, 2022
@jennchenn
jennchenn deleted the host-info-utility branch June 20, 2022 21:45
@github-actions github-actions Bot added this to the 1.2.0 milestone Jun 20, 2022
jennchenn added a commit that referenced this pull request Jun 23, 2022
* Add host information utility

* fixup! Add host information utility

* Rename file to platform

* fixup! Rename file to platform

* Require etc in file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Involves Datadog core libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants