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

ITelemetry.SerializeData instead of Serialize #892

Merged
merged 6 commits into from
Aug 14, 2018

Conversation

cijothomas
Copy link
Contributor

@cijothomas cijothomas commented Aug 14, 2018

Make ITelemetry implement SerializeData instead of Serialize, as only Data part need to be serialized. Rest of the content are known within ITelemetry itself and hence require no explicit serialization call.

So if user want to define a new type, implement ITelemetry. (which include SerializeData - to let channels know what fields are defined by the user. All channels should know how to serialzie the rest of the content as they are on ITelemetry itself.)

For significant contributions please make sure you have completed the following items:

  • Design discussion issue #Strong typed extensibility for Telemetry types #871
  • Changes in public surface reviewed
  • CHANGELOG.md updated with one line description of the fix, and a link to the original issue.
  • The PR will trigger build, unit test, and functional tests automatically. If your PR was submitted from fork - mention one of committers to initiate the build for you.

… data part about the telemetry. No global level info is emitted.
… Data part need to be serialized. Rest of the content are known within ITelemetry itself and hence require no explicit serialization call.
{
EventTelemetry eventTelemetry = telemetryItem as EventTelemetry;
Utils.CopyDictionary(telemetryItem.Context.GlobalProperties, eventTelemetry.Data.properties);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will move duplicate code to a common method.

@cijothomas cijothomas merged commit 8673ed1 into develop Aug 14, 2018
@cijothomas cijothomas deleted the cithomas/extensibiltychanges branch December 16, 2021 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants