Skip to content

Conversation

@TimothyMothra
Copy link

@TimothyMothra TimothyMothra commented Mar 15, 2024

DO NOT MERGE Opening this PR to discuss how to correctly use TypeSpec api.

Background

We've been using a pre-release version of a swagger to work on the beta of our new SDK.
The new TypeSpec just merged this week Azure/azure-rest-api-specs#27430.
I'm trying to onboard our project to the TypeSpec and found several unexpected changes (shown in this PR).
At this point, I don't know if this is an error with the new Typespec, an error with the .NET generator, or if I've missed an onboarding step.

Steps followed

Changes

This is a summary of some of the changes I've discovered

  • classes had their access changed from internal to public.
    • MonitoringDataPoint
    • FilterConjunctionGroupInfo
    • DocumentFilterConjunctionGroupInfo
    • DerivedMetricInfo
    • CollectionConfigurationInfo
    • DocumentStreamInfo
  • several new generated public classes. How to remove these?
    • LiveMetricsClient - we have no need for a "client" class.
    • LiveMetricsClientOptions - we already have our own "options" class.
    • MonitorOpenTelemetryLiveMetricsClientBuilderExtensions
    • MonitorOpenTelemetryLiveMetricsModelFactory

Open Questions

/// <summary> Monitoring data point coming from SDK, which includes metrics, documents and other metadata info. </summary>
internal partial class MonitoringDataPoint
/// <summary> Monitoring data point coming from the client, which includes metrics, documents and other metadata info. </summary>
public partial class MonitoringDataPoint
Copy link
Author

Choose a reason for hiding this comment

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

this is a bug. this type MUST not be public

{
/// <summary> An AND-connected group of FilterInfo objects. </summary>
internal partial class FilterConjunctionGroupInfo
public partial class FilterConjunctionGroupInfo
Copy link
Author

Choose a reason for hiding this comment

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

this is a bug. this type MUST not be public

@github-actions
Copy link

github-actions bot commented Jun 7, 2024

Hi @TimothyMothra. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@JimSuplizio JimSuplizio added the no-recent-activity There has been no recent activity on this issue. label Jul 1, 2024
@jsquire jsquire deleted the tilee/livemetrics_typespec branch February 11, 2025 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Monitor - LiveMetrics no-recent-activity There has been no recent activity on this issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants