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

ResourceDetectors - Host #1507

Merged
merged 6 commits into from
Dec 21, 2023
Merged

Conversation

Kielek
Copy link
Contributor

@Kielek Kielek commented Dec 20, 2023

Fixes N/A

Changes

Initial implementation for host.name detector from https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/host.md (this attribute is what I need for now).

The plan is to release shortly as alpha with reference to OTel 1.6.0.
Then create follow up help-wanted issue to extend it for another attributes and update OTel to 1.7.0.

For significant contributions please make sure you have completed the following items:

  • Appropriate CHANGELOG.md updated for non-trivial changes
  • [ ] Design discussion issue #
  • Changes in public API reviewed

Notes

Similar pr for process: #1506

@Kielek Kielek added the comp:resources.host Things related to OpenTelemetry.Resources.Host label Dec 20, 2023
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: 50 lines in your changes are missing coverage. Please review.

Comparison is base (71655ce) 73.91% compared to head (996e12b) 73.36%.
Report is 107 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1507      +/-   ##
==========================================
- Coverage   73.91%   73.36%   -0.56%     
==========================================
  Files         267      255      -12     
  Lines        9615     9422     -193     
==========================================
- Hits         7107     6912     -195     
- Misses       2508     2510       +2     
Flag Coverage Δ
unittests-Exporter.Geneva 58.03% <49.46%> (?)
unittests-Exporter.OneCollector 89.72% <100.00%> (?)
unittests-Extensions 82.75% <100.00%> (?)
unittests-Instrumentation.AspNet 75.66% <ø> (?)
unittests-Instrumentation.EventCounters 75.92% <ø> (?)
unittests-Instrumentation.Owin 85.71% <ø> (?)
unittests-Instrumentation.Process 100.00% <ø> (?)
unittests-Instrumentation.Runtime 100.00% <ø> (?)
unittests-Instrumentation.StackExchangeRedis 71.00% <ø> (?)
unittests-Instrumentation.Wcf 78.47% <ø> (?)
unittests-PersistentStorage 58.80% <ø> (?)
unittests-ResourceDetectors.Azure 80.90% <ø> (?)
unittests-ResourceDetectors.Host 62.50% <ø> (?)
unittests-ResourceDetectors.Process 100.00% <ø> (?)
unittests-ResourceDetectors.ProcessRuntime 76.08% <ø> (?)
unittests-Solution 80.55% <90.62%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
....Exporter.Geneva/GenevaExporterHelperExtensions.cs 100.00% <ø> (+31.81%) ⬆️
...Telemetry.Exporter.Geneva/GenevaExporterOptions.cs 90.00% <ø> (ø)
...OpenTelemetry.Exporter.Geneva/GenevaLogExporter.cs 85.00% <ø> (+7.50%) ⬆️
...lemetry.Exporter.Geneva/GenevaLoggingExtensions.cs 100.00% <ø> (+14.28%) ⬆️
...enTelemetry.Exporter.Geneva/GenevaTraceExporter.cs 82.50% <ø> (+7.50%) ⬆️
...xporter.Geneva/Internal/ConnectionStringBuilder.cs 92.94% <100.00%> (ø)
...ry.Exporter.Geneva/Internal/ExporterEventSource.cs 14.28% <ø> (+9.52%) ⬆️
...eneva/Internal/ReentrantActivityExportProcessor.cs 100.00% <ø> (ø)
...porter.Geneva/Internal/ReentrantExportProcessor.cs 100.00% <ø> (ø)
...ry.Exporter.Geneva/Internal/TableNameSerializer.cs 98.93% <ø> (ø)
... and 98 more

... and 173 files with indirect coverage changes

@Kielek Kielek marked this pull request as ready for review December 20, 2023 07:19
@Kielek Kielek requested a review from a team December 20, 2023 07:19
@Kielek Kielek changed the title ResourceDetectors -Host ResourceDetectors - Host Dec 20, 2023
build-test-host:
needs: detect-changes
if: |
contains(needs.detect-changes.outputs.changes, 'host')
Copy link
Member

Choose a reason for hiding this comment

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

"host" is too generic? Maybe something more narrow like ResourceDetector.host, if feasible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is in sync with current pattern. Will be handled in scope of #1513 for all packages (for process we have already names conflict).

<MinVerTagPrefix>ResourceDetectors.Host-</MinVerTagPrefix>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OpenTelemetry" Version="1.6.0" />
Copy link
Member

Choose a reason for hiding this comment

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

can you use OTelSdkVersion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From PR description:

The plan is to release shortly as alpha with reference to OTel 1.6.0.
Then create follow up help-wanted issue to extend it for another attributes and update OTel to 1.7.0.

Will do, just after initial release.

@Kielek Kielek merged commit a6ef05a into open-telemetry:main Dec 21, 2023
111 of 112 checks passed
@Kielek Kielek deleted the resource-detector-host branch December 21, 2023 05:59
@Kielek Kielek mentioned this pull request Jan 22, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:resources.host Things related to OpenTelemetry.Resources.Host
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants