Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Add debug and tracing annotations #298

Merged
merged 8 commits into from
Apr 16, 2020
Merged

Add debug and tracing annotations #298

merged 8 commits into from
Apr 16, 2020

Conversation

thangchung
Copy link
Contributor

@thangchung thangchung commented Apr 4, 2020

This PR adds dapr.io/config and dapr.io/log-level into the annotations section in dapr.yaml. Related to #296

Copy link
Member

@rynowak rynowak left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! a few small comments

@@ -138,15 +138,17 @@ public override Task ProcessAsync(ExtensionContext context, ExtensionConfigurati
deployment.Annotations.Add("dapr.io/id", project.Name);
deployment.Annotations.Add("dapr.io/port", (httpBinding.Port ?? 80).ToString(CultureInfo.InvariantCulture));

#pragma warning disable CS8604 // Possible null reference argument.
Copy link
Member

Choose a reason for hiding this comment

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

That's usally done by doing this:

daprConfig!.ToString()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did it with your suggestion, but no luck. Could anyone tell me how can I overcome this check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did deployment.Annotations.TryAdd("dapr.io/config", daprConfig!.ToString() ?? string.Empty);, and it can overcome this check but not sure it is correctly

@rynowak
Copy link
Member

rynowak commented Apr 16, 2020

I'll clone this and take a look. let's try to get this done 👍

@rynowak
Copy link
Member

rynowak commented Apr 16, 2020

This looks close enough and you've got the basics done. I'm going to merge this and then I'll fix the formatting.

@rynowak rynowak merged commit cec77aa into dotnet:master Apr 16, 2020
kishanAnem pushed a commit to kishanAnem/tye that referenced this pull request Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants