-
Notifications
You must be signed in to change notification settings - Fork 93
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
Add NuGet packages #2286
Add NuGet packages #2286
Conversation
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.
Some suggestions!
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 will back to this PR next week. For now only less important comments after scrolling through it.
@@ -8,19 +8,20 @@ | |||
<EnablePublicApi>true</EnablePublicApi> | |||
|
|||
<!-- NuGet packages --> | |||
<Version>0.6.0$(VersionSuffix)</Version> | |||
<IsPackable>true</IsPackable> | |||
<PackageIconUrl>https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/raw/main/opentelemetry-logo-64x64.png</PackageIconUrl> |
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.
Before publishing, check if we are using the same file as SDK/contrib
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.
Definitely, before going public we should review all of the NuGet properties. For instance: PackageIconUrl is actually deprecated (see open-telemetry/opentelemetry-dotnet#325). Related: @pellared suggested using a validation tool to ensure some properties on the NuGet packages.
test/test-applications/nuget-packages/TestApplication.SelfContained/Program.cs
Show resolved
Hide resolved
src/OpenTelemetry.AutoInstrumentation/OpenTelemetry.AutoInstrumentation.csproj
Show resolved
Hide resolved
nuget/OpenTelemetry.AutoInstrumentation/contentFiles/any/any/integrations.json
Show resolved
Hide resolved
I started with PR review and got few questions.
|
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Two reasons: first is that I want the name
When using NuGet packages there should be no need for the AdditionalDeps and SharedStore. I agree that these two packages are almost redundant with each other: the small difference is that the
Yes, all libraries get added to the application |
87eae89
to
43c7a7e
Compare
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's still unclear to me why we need OpenTelemetry.AutoInstrumentation.Runtime.Managed
as the Nuget package OpenTelemetry.AutoInstrumentation.Dependencies
will have indirect reference to all the packages listed out in OpenTelemetry.AutoInstrumentation.Runtime.Managed
. I guess we might be trying to resolve assembly redirect with .NET framework.
We are not making these Nuget as public yet. It's good to keep both of them and figure out later if we need both of these Nuget.
Excellent work!
@pjanotti, my only conclusive thought. Should we add an output cleanup task also to the follow-ups? Maybe we can:
|
That's a good point @RassK: I think we need to document and make explicit that by default libraries related to all possible instrumentations are going to be added when using the current NuGet packages. Then see if there is actual demand to reduce the size of the packages. Assuming that there is let's do a quick brainstorming to see what can be done to remove/control these extra dependencies when using the NuGet packages.
<PackageReference Include="OpenTelemetry.Instrumentation.StackExchangeRedis" Version="1.0.0-rc9.8" ExcludeAssets="all" />
<PackageReference Include="StackExchange.Redis" Version="2.1.58" ExcludeAssets="all" /> This is pretty tedious to be done manually given that most NuGet packages only have one asset and it requires identifying all items that one wants to exclude. At some level automation can help here, perhaps some
This seems a bit trickier: would we have to put these in the NuGet package as content, and anyway still need to figure out what to remove add. So at first sounds like the trouble of idea number 1 without clear advantages. |
Why
Distribute automatic instrumentation as NuGet packages: it simplifies deployment for some scenarios and ensure assembly compatibility.
Fixes #1541 - Note: this PR doesn't take care of publishing the packages.
What
.csproj
are built on a Windows runner to avoid requiring targeting packs for .NET Framework on the other runner.OpenTelemetry.AutoInstrumentation.NuGet.Packages
.OpenTelemetry.AutoInstrumentation
: brings all that is needed to automatically instrument an application.OpenTelemetry.AutoInstrumentation.Dependencies
: all dependencies used by automatic instrumentation. Intended forself-contained
applications sharing an installation of OTel automatic instrumentation.Follow-ups
TestHelper
: this change uses a temporary hack for theTestNuGetPackages
target.tracer-home
and theDependencies
NuGet package (simulate shared deployment). This test was done manually, but, it will be good to have it on the normal integration tests.Dockerfile
.nuget.org
.Tests
bin/tracer-home
) to ensure that only the NuGet packages are being used to instrument the test applications.Checklist
- [ ]CHANGELOG.md
is updated.