opentelemetry-dotnet-instrumentation icon indicating copy to clipboard operation
opentelemetry-dotnet-instrumentation copied to clipboard

Remove indirect dependencies from additional store

Open Kielek opened this issue 3 years ago • 5 comments
trafficstars

The change itself looks good.

I do have a question about the dependencies that are being added to the additional deps. Aren't they dependencies of the library being instrumented? It seems that they would be already present on the application it self. I'm assuming that instrumentation helper/middleman indirectly depends on those. Is that correct?

Anyway, the change looks good. This question of indirect dependencies, if real, can and should be addressed separately.

Originally posted by @pjanotti in https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/pull/1320#pullrequestreview-1134854978

The same question under: https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/pull/1320#discussion_r990367416


We should probably remove indirect dependencies like in https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/src/CommonExcludedAssets.props

Kielek avatar Oct 07 '22 18:10 Kielek

Done in scope of #1829

Kielek avatar Jan 19 '23 11:01 Kielek

Reopening. Discovered that we don't need to ship MongoDB transient packages. Some more scans must be made to understand the missing scope (mostly issue with packages that have multi layer transient packages).

Additionally, version ranges could vary by transient dependencies.

RassK avatar Feb 22 '23 21:02 RassK

@rajkumar-rangaraj do you know if there are any straightforward ways to remove transient deps for specific package? ... or do you think this is entirely manual job?

The MongoDB case is the following:

  • MongoDB.Driver.Core.Extensions.DiagnosticSources is the main package, keep
  • MongoDB.Driver.Core is transient package of MongoDB.Driver.Core.Extensions.DiagnosticSources, delete
  • DnsClient is transient package of MongoDB.Driver.Core, delete
  • MongoDB.Bson is transient package of MongoDB.Driver.Core, delete
  • MongoDB.Libmongocrypt is transient package of MongoDB.Driver.Core, delete
  • SharpCompress is transient package of MongoDB.Driver.Core, delete

RassK avatar Feb 23 '23 11:02 RassK

There are no easy ways to remove it. We need to customize in build steps.

rajkumar-rangaraj avatar Mar 01 '23 16:03 rajkumar-rangaraj

Moving to post 1.0.0 release. Most important parts was removed while working on MognoDB task. Further optimization can be handled after GA.

Kielek avatar Apr 17 '23 07:04 Kielek