Add notes for System.Diagnostics.Activity#117
Conversation
51c2e39 to
b452b71
Compare
| ## Notes | ||
|
|
||
| * `ActivityKind` | ||
| * Looks like `ActivityKind.Internal` is supposed to be the default which |
There was a problem hiding this comment.
We decided to set Internal=0 and shift the rest.
| * Looks like `ActivityKind.Internal` is supposed to be the default which | ||
| [Python defines][python_activity] as `0`. We should do the same. | ||
| * Should we put these API in a namespace of `System.Diagnostics`? This | ||
| namespace already contains many technologies. |
There was a problem hiding this comment.
We decided to keep the APIs in System.Diagnostics because the Activity class is in this namespace.
| `right` | ||
| * We should name the parameter of the strongly typed `Equals` as `value` | ||
| * `ActivityEvent` | ||
| * Can we make this a `struct`? |
There was a problem hiding this comment.
We decided to change this to struct instead of class.
| Dispose(bool disposing)` and `Dispose()` should call `Dispose(true)`. | ||
| * `SetCustomProperty` and `GetCustomProperty` have no way to differentiate | ||
| between a property is set to `null` vs. a property wasn't set at all. Is | ||
| this OK? |
There was a problem hiding this comment.
We decided it is OK for this scenario.
| `right` | ||
| * We should name the parameter of the strongly typed `Equals` as `value` | ||
| * Should `IDictionary<string, string>` be a `IReadOnlyDictionary<string, string>`? | ||
| * Should the `attributes` parameter be optional and defaulted to `null`? |
There was a problem hiding this comment.
Yes, we decided to go with the optional parameters.
| * We should name the parameters of `operator==` and `operator!=` as `left` and | ||
| `right` | ||
| * We should name the parameter of the strongly typed `Equals` as `value` | ||
| * Should `IDictionary<string, string>` be a `IReadOnlyDictionary<string, string>`? |
There was a problem hiding this comment.
I have reviewed the OpenTelemetry specs and it requires the attributes be defined as the tags and preserve the order too. So, I think either we need to make this as IEnumerable or we'll consider the suggestion mentioned in on StartActivity to have something like ActivtyTagsCollection
|
@terrajobst do we consider this conditionally approved? of course, we'll report back by the email when applying the feedback comments and have a final design for the listener API. |
Yes, which is what the notes say at the top ("Approved with feedback"). I should have marked the issue as approved too, but didn't. Will do no! |
No description provided.