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

CloudTraceExtensions.TryAddGoogleTraceContextProvider is missing #6672

Closed
EatonZ opened this issue Jun 26, 2021 · 6 comments · Fixed by #6711 or #6772
Closed

CloudTraceExtensions.TryAddGoogleTraceContextProvider is missing #6672

EatonZ opened this issue Jun 26, 2021 · 6 comments · Fixed by #6711 or #6772
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@EatonZ
Copy link
Contributor

EatonZ commented Jun 26, 2021

Hi,

I upgraded to Google.Cloud.Diagnostics.AspNetCore3 4.3.0-beta01 and have had to make a few changes to my code to accommodate various obsoletions and changes.

I have this code in my ConfigureServices method:
services.AddSingleton<ITraceContext>(new GoogleTraceProvider());

In the beta this no longer compiles. It tells me to: "Use CloudTraceExtensions.TryAddGoogleTraceContextProvider instead."

That method does not seem to exist.

@jskeet
Copy link
Collaborator

jskeet commented Jun 26, 2021

Thanks for the report - I'll have a look on Monday. It's possible that the message should just be changed to "Use CloudTraceExtensions.AddGoogleTrace instead" - that method definitely does exist.

@amanda-tarafa
Copy link
Contributor

It's here

public static IServiceCollection TryAddGoogleTraceContextProvider(this IServiceCollection services)

@EatonZ
Copy link
Contributor Author

EatonZ commented Jun 26, 2021

@amanda-tarafa Is it not in this beta? There is only 1 CloudTraceExtensions class showing up and it looks like this:

ggl

@jskeet
Copy link
Collaborator

jskeet commented Jun 26, 2021

@EatonZ: That's a different class - the one Amanda pointed to before is in Google.Cloud.Diagnostics.AspNetCore

@EatonZ
Copy link
Contributor Author

EatonZ commented Jun 26, 2021

@jskeet I figured it out now.
The obsoletion suggested this: CloudTraceExtensions.TryAddGoogleTraceContextProvider
When it should be this: CloudTraceExtension.TryAddGoogleTraceContextProvider

There is a CloudTraceExtensions and a CloudTraceExtension class.
IntelliSense didn't pick up the non-s version immediately.

@amanda-tarafa
Copy link
Contributor

Ah yes, sorry for the confusion. I'll update the Obsolete suggestion to include the full namespace and remove the s.

The class in Common is new so I named it with the usual naming convention, with the s. The one in AspNetCore* it's older and changing the name now to include the s would be breaking.

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jun 26, 2021
@jskeet jskeet added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels Jun 30, 2021
amanda-tarafa added a commit to amanda-tarafa/google-cloud-dotnet that referenced this issue Jul 5, 2021
amanda-tarafa added a commit to amanda-tarafa/google-cloud-dotnet that referenced this issue Jul 5, 2021
amanda-tarafa added a commit to amanda-tarafa/google-cloud-dotnet that referenced this issue Jul 22, 2021
Changes in Google.Cloud.Diagnostics.AspNetCore version 4.3.0-beta02:

- [Commit c682904](googleapis@c682904):
  - feat: Adds trace context information to error log entries.
  - Closes [issue 5360](googleapis#5360)
- [Commit 1245ded](googleapis@1245ded): fix: Fully qualifies all alternative types/members for obsolete ones. Fixes [issue 6672](googleapis#6672)

Changes in Google.Cloud.Diagnostics.AspNetCore3 version 4.3.0-beta02:

- [Commit c682904](googleapis@c682904):
  - feat: Adds trace context information to error log entries.
  - Closes [issue 5360](googleapis#5360)
- [Commit 1245ded](googleapis@1245ded): fix: Fully qualifies all alternative types/members for obsolete ones. Fixes [issue 6672](googleapis#6672)

Packages in this release:
- Release Google.Cloud.Diagnostics.AspNetCore version 4.3.0-beta02
- Release Google.Cloud.Diagnostics.AspNetCore3 version 4.3.0-beta02
- Release Google.Cloud.Diagnostics.Common version 4.3.0-beta02
amanda-tarafa added a commit to amanda-tarafa/google-cloud-dotnet that referenced this issue Jul 22, 2021
Changes in Google.Cloud.Diagnostics.AspNetCore version 4.3.0-beta02:

- [Commit c682904](googleapis@c682904):
  - feat: Adds trace context information to error log entries.
  - Closes [issue 5360](googleapis#5360)
- [Commit 1245ded](googleapis@1245ded): fix: Fully qualifies all alternative types/members for obsolete ones. Fixes [issue 6672](googleapis#6672)

Changes in Google.Cloud.Diagnostics.AspNetCore3 version 4.3.0-beta02:

- [Commit c682904](googleapis@c682904):
  - feat: Adds trace context information to error log entries.
  - Closes [issue 5360](googleapis#5360)
- [Commit 1245ded](googleapis@1245ded): fix: Fully qualifies all alternative types/members for obsolete ones. Fixes [issue 6672](googleapis#6672)

Packages in this release:
- Release Google.Cloud.Diagnostics.AspNetCore version 4.3.0-beta02
- Release Google.Cloud.Diagnostics.AspNetCore3 version 4.3.0-beta02
- Release Google.Cloud.Diagnostics.Common version 4.3.0-beta02
amanda-tarafa added a commit that referenced this issue Jul 22, 2021
Changes in Google.Cloud.Diagnostics.AspNetCore version 4.3.0-beta02:

- [Commit c682904](c682904):
  - feat: Adds trace context information to error log entries.
  - Closes [issue 5360](#5360)
- [Commit 1245ded](1245ded): fix: Fully qualifies all alternative types/members for obsolete ones. Fixes [issue 6672](#6672)

Changes in Google.Cloud.Diagnostics.AspNetCore3 version 4.3.0-beta02:

- [Commit c682904](c682904):
  - feat: Adds trace context information to error log entries.
  - Closes [issue 5360](#5360)
- [Commit 1245ded](1245ded): fix: Fully qualifies all alternative types/members for obsolete ones. Fixes [issue 6672](#6672)

Packages in this release:
- Release Google.Cloud.Diagnostics.AspNetCore version 4.3.0-beta02
- Release Google.Cloud.Diagnostics.AspNetCore3 version 4.3.0-beta02
- Release Google.Cloud.Diagnostics.Common version 4.3.0-beta02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
4 participants