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

Creation Time Utc #376

Closed
Hinton opened this issue Feb 20, 2018 · 7 comments
Closed

Creation Time Utc #376

Hinton opened this issue Feb 20, 2018 · 7 comments
Assignees
Labels
area-documentation Issues related to fixing or improving documentation for the client library. bug Something isn't working.

Comments

@Hinton
Copy link

Hinton commented Feb 20, 2018

  • OS and version used: Windows 10

  • SDK version used: 1.6.2

Description of the issue:

The C# SDK supports setting a CreationTimeUtc property on the Microsoft.Azure.Devices.Client.Message class, which afterwards shows up in the Event Hub endpoint of the IoT Hub as iothub-creation-time-utc.

I've been unable to find any references to this property in the IoT Hub documentation or in the other SDKs (C, Node.js). Is this an official supported property, and the best practice for sending the timestamp of the message?

Code sample exhibiting the issue:

using (DeviceClient iotClient = DeviceClient.Create(config.IoTHub, auth))
{
    var message = new Message(Encoding.ASCII.GetBytes("{}"));
    message.CreationTimeUtc = DateTime.UtcNow;
    await iotClient.SendEventAsync(message);
}
@CIPop CIPop added question Further information is requested. area-documentation Issues related to fixing or improving documentation for the client library. labels Feb 20, 2018
@CIPop
Copy link
Member

CIPop commented Feb 20, 2018

@tameraw @pierreca @jspaith Is this property supported / planned on the Node and C SDKs? If not, is there a workaround?

Is this an official supported property, and the best practice for sending the timestamp of the message?

@yzhong94 @simonporter PTAL

@pierreca
Copy link

Doesn't look like the Node SDK supports it. is this something we should add to the backlog?

@yzhong94
Copy link
Contributor

@Hinton Can you give some details on your use case for setting CreationTimeUtc? Do you need it for downstream processing or for debugging?

@Hinton
Copy link
Author

Hinton commented Feb 27, 2018

@yzhong94 In our use case, the IoT device may be offline for some periods, during which we continue to collect telemetry data. Once the device gets connectivity to Azure IoT Hub we stream up the collected telemetry. This requires us to also send the timestamp of when the telemetry was collected.

So it's primarily for downstream processing but could also be useful for debugging.

@CIPop CIPop added bug Something isn't working. and removed question Further information is requested. labels Mar 20, 2018
@CIPop
Copy link
Member

CIPop commented Mar 20, 2018

@dominicbetts
Copy link
Member

@CIPop - I've merged the doc change -it'll be published later today. I don't have permission to close this issue - can you do it? Thanks

@CIPop
Copy link
Member

CIPop commented Mar 23, 2018

Thanks @dominicbetts !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-documentation Issues related to fixing or improving documentation for the client library. bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

5 participants