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

Replace InstrumentRecorder with MetricCollector #48931

Merged
merged 5 commits into from
Jun 22, 2023
Merged

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jun 21, 2023

InstrumentRecorder is being replaced by MetricCollector.

The notable change is the PR references a dotnet/extensions package for testing. I don't know if we've done that before in dotnet/aspnetcore. @wtgodbe I'll need your help getting the new dependency setup correctly.

@JamesNK JamesNK marked this pull request as ready for review June 21, 2023 05:14
@JamesNK
Copy link
Member Author

JamesNK commented Jun 21, 2023

cc @noahfalk @tarekgh @geeknoid

@JamesNK
Copy link
Member Author

JamesNK commented Jun 21, 2023

Wow, the build passed.

@wtgodbe Please double-check the necessary add-dependency rituals have been performed.

@@ -134,6 +134,8 @@
<SystemDiagnosticsPerformanceCounterVersion>8.0.0-preview.6.23318.9</SystemDiagnosticsPerformanceCounterVersion>
<SystemIOHashingVersion>8.0.0-preview.6.23318.9</SystemIOHashingVersion>
<SystemRuntimeCachingVersion>8.0.0-preview.6.23318.9</SystemRuntimeCachingVersion>
<!-- Packages from dotnet/extensions -->
<MicrosoftExtensionsTelemetryTestingVersion>8.0.0-preview.6.23320.3</MicrosoftExtensionsTelemetryTestingVersion>
Copy link
Member

Choose a reason for hiding this comment

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

8.0.0-preview.6.23320.3<

interesting, @geeknoid changes already published to NuGet?

@@ -41,6 +41,10 @@
<Uri>https:/dotnet/efcore</Uri>
<Sha>b0b202671f7879070423e95776edc014885335ad</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Telemetry.Testing" Version="8.0.0-preview.6.23320.3">
Copy link
Member

Choose a reason for hiding this comment

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

If this is from the main branch, then everything's set up correctly in this PR. All we'll need is to add a subscription from extensions into this repo. The only issue there is it creates a circular dependency between this repo and extensions, which can be a problem for product construction. I think it'll be fine if we set up the extensions -> aspnetcore sub to be everyWeek frequency - @mmitche to confirm

Copy link
Member

Choose a reason for hiding this comment

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

You beat me to it :P, I was about to ask about the circular dependency for this. Keep in mind this dependency is for use in tests only, so I think that in the case that darc doesn't allow to setup this subscription could go with two options:

  • Either add support in dependency flow for test-only dependencies (similar to how we have special case for tooling today) so we can introduce ciruclar dependencies on these cases, or
  • Not use dependency flow for test-only dependencies that could introduce ciruclar dependencies for repos. If we go with that plan, then we undo the change to this Version.Details.xml file and we just update the version we depend on in a as-needed basis.

Copy link
Member

Choose a reason for hiding this comment

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

Or C: Do not allow circular dependencies.

Copy link
Member

Choose a reason for hiding this comment

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

Circular dependencies are allowed for testing purposes. However, this must be moved to the ToolsetDependencies section otherwise the product is incoherent and cannot be shipped. What this means is:

  • dotnet/extensions outputs will not show in the build drop.
  • dotnet/extensions outputs is not part of the main SDK-umbrella product.

It's my understanding that this is the intention. If it's not, then we have a product layering issue, or we need to change how we prep the product for shipping. As usual, that would make me question why we have a separate repo for these things in the first place.

Copy link
Member

Choose a reason for hiding this comment

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

Yup, the intention is for this to be test-only and shouldn't be in the build drop nor part of the main SDK product. @mmitche so is the concrete feedback then that we should move these 4 lines on this file down to <ToolsetDependencies> section (line 360), and then that should allow us to setup darc subscription correctly? Or is there something else that needs to be done to setup the darc subscription?

Copy link
Member

Choose a reason for hiding this comment

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

@JamesNK @joperezr let me know if you need my help setting up the subscription

Copy link
Member Author

@JamesNK JamesNK Jun 21, 2023

Choose a reason for hiding this comment

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

Yes please.

Note: The InstrumentRecorder has just been removed from runtime (for this preview) so this PR needs to make it in, otherwise we'll be blocked when consuming runtime updates.

dotnet/runtime#87873

I've just woken up and have meetings for the next couple of hours 😬

Copy link
Member

@mmitche mmitche Jun 21, 2023

Choose a reason for hiding this comment

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

To confirm, this dependency needs to be moved to Toolset before this gets checked in.

Copy link
Member

Choose a reason for hiding this comment

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

Subscription created

https:/dotnet/extensions (.NET 8) ==> 'https:/dotnet/aspnetcore' ('main')
  - Id: ba55bbf2-4239-468a-a9c6-08db6772cb2c
  - Update Frequency: EveryWeek
  - Enabled: True
  - Batchable: False
  - PR Failure Notification tags: 
  - Merge Policies:
    AllChecksSuccessful
      ignoreChecks = 
                       [
                         "aspnetcore-quarantined-pr",
                         "aspnetcore-quarantined-pr (Tests: Helix),",
                         "aspnetcore-quarantined-pr (Tests: macOS),",
                         "aspnetcore-quarantined-pr (Tests: Ubuntu x64),",
                         "aspnetcore-quarantined-pr (Tests: Windows x64)"
                       ]
    NoRequestedChanges

Copy link
Member Author

Choose a reason for hiding this comment

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

To confirm, this dependency needs to be moved to Toolset before this gets checked in.

Moved dependency to toolset.

@JamesNK JamesNK merged commit 03edc26 into main Jun 22, 2023
@JamesNK JamesNK deleted the jamesnk/metric-collector branch June 22, 2023 03:19
@ghost ghost added this to the 8.0-preview7 milestone Jun 22, 2023
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants