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

Introduce Timestamps Option via mgmt.sock #4970

Merged

Conversation

yophilav
Copy link
Contributor

@yophilav yophilav commented May 10, 2021

  • Allow Management socket to accept timestamps option to be pass through docker socket API.
  • Update the documents for the latest API version
  • The latest API is being manually added since there is a gigantic out-of-sync between the template interface managementVersion_2020_07_07.yaml and /edgelet/management generated code.

dmolokanov
dmolokanov previously approved these changes May 10, 2021
Copy link
Contributor

@dmolokanov dmolokanov left a comment

Choose a reason for hiding this comment

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

is this something that is auto-generated?

Copy link
Member

@arsing arsing left a comment

Choose a reason for hiding this comment

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

parameters:
- $ref: '#/parameters/api-version'
- in: path
name: name
description: The name of the module to obtain logs for. (urlencoded)
required: true
type: string
- in: query
name: follow
description: Return the logs as a stream.
type: boolean
default: false
- in: query
name: tail
description: Only return this number of lines from the end of the logs.
type: string
default: "all"
- in: query
name: since
description: Only return logs since this time, as a duration (1 day, 1d, 90m, 2 days 3 hours 2 minutes), rfc3339 timestamp, or UNIX timestamp.
type: string
default: "0"
and https://github.com/Azure/iotedge/tree/6c4269a0bc7640e22aa60461c2109fbf96f95ef3/edgelet/management need to be updated.

@yophilav yophilav requested a review from arsing May 12, 2021 01:47
@lfitchett
Copy link
Contributor

@gordonwang0 FYI for tokio update since this has mgmt api changes

@kodiakhq kodiakhq bot merged commit 37c661b into Azure:release/1.2 May 14, 2021
yophilav added a commit to yophilav/iotedge that referenced this pull request May 14, 2021
- Allow Management socket to accept `timestamps` option to be pass through docker socket API.
- Update the documents for the latest API version
- The latest API is being manually added since there is a gigantic out-of-sync between the template interface `managementVersion_2020_07_07.yaml` and `/edgelet/management` generated code.
yophilav added a commit that referenced this pull request Jun 17, 2021
…#4981)

Context:
It generates the attached file, if a module does not use the prescribed logging format (which most module do not), the timestamp is 0. This makes the logs not very useful. The timestamp irrespective of logging format is actually available from Docker log API.

Solution: 
This PR issues `timestamps` from edgeAgent via mgmt.sock to prepending the returning log with timestamp.  edgeAgent then parse the timestamp & return the value in json format to portal.

Note: 
This feature requires #4970
yophilav added a commit to yophilav/iotedge that referenced this pull request Jun 25, 2021
- Allow Management socket to accept `timestamps` option to be pass through docker socket API.
- Update the documents for the latest API version
- The latest API is being manually added since there is a gigantic out-of-sync between the template interface `managementVersion_2020_07_07.yaml` and `/edgelet/management` generated code.
yophilav added a commit to yophilav/iotedge that referenced this pull request Jun 25, 2021
…Azure#4981)

Context:
It generates the attached file, if a module does not use the prescribed logging format (which most module do not), the timestamp is 0. This makes the logs not very useful. The timestamp irrespective of logging format is actually available from Docker log API.

Solution: 
This PR issues `timestamps` from edgeAgent via mgmt.sock to prepending the returning log with timestamp.  edgeAgent then parse the timestamp & return the value in json format to portal.

Note: 
This feature requires Azure#4970
kodiakhq bot pushed a commit that referenced this pull request Jun 25, 2021
…4981) (#5167)

Context:
It generates the attached file, if a module does not use the prescribed logging format (which most module do not), the timestamp is 0. This makes the logs not very useful. The timestamp irrespective of logging format is actually available from Docker log API.

Solution: 
This PR issues `timestamps` from edgeAgent via mgmt.sock to prepending the returning log with timestamp.  edgeAgent then parse the timestamp & return the value in json format to portal.

Note: 
This feature requires #4970
kodiakhq bot pushed a commit that referenced this pull request Jun 25, 2021
- Allow Management socket to accept `timestamps` option to be pass through docker socket API.
- Update the documents for the latest API version
- The latest API is being manually added since there is a gigantic out-of-sync between the template interface `managementVersion_2020_07_07.yaml` and `/edgelet/management` generated code.
nyanzebra pushed a commit to nyanzebra/iotedge that referenced this pull request Jul 2, 2021
…zure#4981) (Azure#5167)

Context:
It generates the attached file, if a module does not use the prescribed logging format (which most module do not), the timestamp is 0. This makes the logs not very useful. The timestamp irrespective of logging format is actually available from Docker log API.

Solution: 
This PR issues `timestamps` from edgeAgent via mgmt.sock to prepending the returning log with timestamp.  edgeAgent then parse the timestamp & return the value in json format to portal.

Note: 
This feature requires Azure#4970
nyanzebra pushed a commit to nyanzebra/iotedge that referenced this pull request Jul 2, 2021
- Allow Management socket to accept `timestamps` option to be pass through docker socket API.
- Update the documents for the latest API version
- The latest API is being manually added since there is a gigantic out-of-sync between the template interface `managementVersion_2020_07_07.yaml` and `/edgelet/management` generated code.
ggjjj pushed a commit to ggjjj/iotedge that referenced this pull request Jul 22, 2021
…zure#4981) (Azure#5167)

Context:
It generates the attached file, if a module does not use the prescribed logging format (which most module do not), the timestamp is 0. This makes the logs not very useful. The timestamp irrespective of logging format is actually available from Docker log API.

Solution: 
This PR issues `timestamps` from edgeAgent via mgmt.sock to prepending the returning log with timestamp.  edgeAgent then parse the timestamp & return the value in json format to portal.

Note: 
This feature requires Azure#4970
ggjjj pushed a commit to ggjjj/iotedge that referenced this pull request Jul 22, 2021
- Allow Management socket to accept `timestamps` option to be pass through docker socket API.
- Update the documents for the latest API version
- The latest API is being manually added since there is a gigantic out-of-sync between the template interface `managementVersion_2020_07_07.yaml` and `/edgelet/management` generated code.
damonbarry pushed a commit to damonbarry/iotedge that referenced this pull request Apr 15, 2022
…zure#4981) (Azure#5167)

Context:
It generates the attached file, if a module does not use the prescribed logging format (which most module do not), the timestamp is 0. This makes the logs not very useful. The timestamp irrespective of logging format is actually available from Docker log API.

Solution: 
This PR issues `timestamps` from edgeAgent via mgmt.sock to prepending the returning log with timestamp.  edgeAgent then parse the timestamp & return the value in json format to portal.

Note: 
This feature requires Azure#4970
damonbarry pushed a commit to damonbarry/iotedge that referenced this pull request Apr 15, 2022
- Allow Management socket to accept `timestamps` option to be pass through docker socket API.
- Update the documents for the latest API version
- The latest API is being manually added since there is a gigantic out-of-sync between the template interface `managementVersion_2020_07_07.yaml` and `/edgelet/management` generated code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants