-
Notifications
You must be signed in to change notification settings - Fork 765
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
docs: resource-detector
should not be tied to tracing
#5188
Conversation
Thank you for tackling this! |
@luizhlelis #5185 is merged. Please resolve the merge conflicts. |
docs/resources/README.md
Outdated
Follow [this](#resource-detector) document | ||
to learn about writing custom resource detectors. | ||
|
||
The snippet below shows configuring the `Resource` associated with the provider. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this section is tricky, as it is tied to Tracing signal.. We need to document all three with SDK.CreateProvider and the OTel.Ext.Hosting style of configuration of resource.
The env variables part is good for all three.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luizhlelis See if you can fix this part too. If not, we can still merge, and do some follow ups later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @cijothomas, I've just removed that section from the resource
doc. I left those definitions tied to the signals, for instance, trace, metrics, and logs. Please, let me know if that's what you want or if I should move them all to the new resource
doc.
docs/resources/README.md
Outdated
[OpenTelemetry](../../src/OpenTelemetry/README.md) package), and implement | ||
the `Detect` method. | ||
|
||
A demo ResourceDetector is shown [here](../trace/extending-the-sdk/MyResourceDetector.cs). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to simply show the code snippet to create a custom ResourceDetector
here instead of pointing to docs/trace/..
.
You could then add code snippets that show how to add this custom ResourceDetector
to all the three signals using both Sdk.Create/LoggerFactory.Create
and Extensions.Hosting
approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you would like to address these in this PR itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5188 +/- ##
==========================================
- Coverage 83.38% 83.13% -0.26%
==========================================
Files 297 271 -26
Lines 12531 11970 -561
==========================================
- Hits 10449 9951 -498
+ Misses 2082 2019 -63
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cijothomas and @utpilla, when you have the chance, please review the PR again. Let me know if I need to do something else.
docs/resources/README.md
Outdated
Follow [this](#resource-detector) document | ||
to learn about writing custom resource detectors. | ||
|
||
The snippet below shows configuring the `Resource` associated with the provider. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @cijothomas, I've just removed that section from the resource
doc. I left those definitions tied to the signals, for instance, trace, metrics, and logs. Please, let me know if that's what you want or if I should move them all to the new resource
doc.
docs/resources/README.md
Outdated
[OpenTelemetry](../../src/OpenTelemetry/README.md) package), and implement | ||
the `Detect` method. | ||
|
||
A demo ResourceDetector is shown [here](../trace/extending-the-sdk/MyResourceDetector.cs). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Utkarsh and myself both were on vacation. I just came back today - will review by tomorrow. Thanks for waiting patiently! |
@@ -0,0 +1,109 @@ | |||
# Resources | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be good to give a background on what is resource etc. here in a follow up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does make resource less tied to tracing, so approving to merge.
We need to have a follow up to move the Resource readme from individual docs to the newly created common place. Specifically, content from https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/docs/metrics/customizing-the-sdk#resource (and logs, traces too), should be moved to the common doc as much as possible
Fixes #3027
Design discussion issue #3027
Changes
resource
to its own section;Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes